Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Problems passing values from popup window to parent window


Message #1 by constancebeckett@h... on Thu, 9 May 2002 15:16:20
> Hi,

> Ok, I've been struggling with this all day:-
> <%
> if not rs.eof then
> while not (rs.eof)
> %>
> <tr><td><input onclick="opener.document.forms
> [0].customername.value=this.forms[0][<%=(rs.Fields.Item
> ("codacode").Value)%>].value" name="<%=(rs.Fields.Item
("codacode").Value)%
> >" type="Text" value="<%=(rs.Fields.Item("name").Value)%>"></td></tr>
> <%
> rs.movenext
> Wend
> end if
>
> The extract is from a popup window:-
> Basically I have a recordset which is written to the page using a loop
> thru the recordset, the name I give the text box is a unique code from
> the recordset and the value written to the textbox is from the 
recordset.
> I'm trying to pass the the textbox value back to the parent window using
> the opener statement, however the following bit  -
> onclick="opener.document.forms[0].customername.value=this.forms[0][<%=
> (rs.Fields.Item("codacode").Value)%>].value"  doesn't work, it doesn't
> work if I surround the <%=(rs.Fields.Item("codacode").Value)%> bit in
> single quotes either. Help!!!

Try...

onclick="opener.document.forms[0].customername.value=this.value

HTH,

Chris

So simple......thanks. Connie



  Return to Index