|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Passing Variables from Child Window to Parent Window using Javascript
Hi all.....
I'm trying to pass a variable from a child window to the parent window. How do I do this? I roughly know how do do this... eg using opener.something ... but I don't understand it conceptually... Can anyone be kind enough to help me with this? Any explaination is deeeply appreciated. I'm tired of searching for it over the web. ![]() |
|
#2
|
|||
|
|||
|
I just answered something similar a few weeks ago
![]() Make sure you've set the var in teh parent window already. Then you can reassign its value from a child window with opener.varname="new value" Hope that helps. |
|
#3
|
||||
|
||||
|
Kewll... thanks a lot for that! I'll give it a go and see how it goes...
Extra question: I just don't quite understand that conceptually... Ok... if I set the variable in the parent... Quote:
Then in the child, if I dump the chosen color from a form into the variable..... Quote:
will it pop up in the parent window immediately or do I have to refresh it first? Sorry if I don't look like I know what I'm doing... I'm a newbie in Javascript. ![]() Thanks again. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Programming Tools > Passing Variables from Child Window to Parent Window using Javascript |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|