Click to See Complete Forum and Search --> : I know, is possible, but how to


marcoacs
06-10-2003, 09:57 AM
Hi all,

i need your help and experience in Javascript.


This is my sample form:

<form action="pagea.cfm" method="post" name="test_child_win">
<table width="468" border="0">
<tr>
<td>name</td>
<td>
<input type="text" name="name" id="name"></td>
<td></td>
</tr>
<tr>
<td>state</td>
<td>
<select name="states" size="1" id="states">
<option value="585585425258459658745269584526954">California</option>
<option value="695458245759615254485964851225987">Florida</option>
<option value="338458774156821305359024820358452">Texas</option>
</select></td>
<td><a href="#" onclick="MM_openBrWindow('pageb.cfm','pageb','')">new state</a></td>
</tr>
<tr>
<td></td>
<td>
<input type="submit" name="submit" value="Go" id="submit"></td>
<td></td>
</tr>
</table>
</form>


When user need insert a new state, open new child window, enter the name of the state, save that new state more a stateID (unique ID created in ColdFusion - 35 chars) in DB and send to parent window (form test_child_win->field states) 2 vars:

- the new state name

- the stateID

Is possible?

How to send to parent window stateID?

Thanx for any help.


Marco

Khalid Ali
06-10-2003, 11:01 AM
This link has an extensive display of parent child window interaction.Hope this helps

http://68.145.35.86/skills/javascripts/ParentWinInteractionWithChildWin.html

marcoacs
06-10-2003, 12:39 PM
Thank you Khalid

but how to pass 2 vars: stateID and statename from child window to parent? Can help me?

Khalid Ali
06-10-2003, 01:21 PM
Your answer is in the code, look at the code and try to understand it..ask me specific questions...

marcoacs
06-10-2003, 03:08 PM
OK Khalid.


Your example is very good. But i don't know how to pass that 2 vars:

stateID and statename from child to parent window. Look this example:

i need put stateID (35 chars) from child to option value sentence. And statename. This is very hard to understand.



<td>
<select name="states" size="1" id="states">
<option value="585585425258459658745269584526954">California</option>
<option value="695458245759615254485964851225987">Florida</option>
<option value="338458774156821305359024820358452">Texas</option>
</select></td>


Thank you for your help...