Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pop-up Window passing multiple values

Status
Not open for further replies.

NeedFood

MIS
Dec 15, 2004
3
US
I'm creating pop-up window for ASP.NET using JavaScript.

I'm tring to pass multiple values from pop-up window to the original window. If I'm passing a single value, it works. Does anyone know how to pass multiple values?

Thank you.

Here is my code which doen't work.

** Original window side **
<a href="javascript:Lookup_Position_window=window.open('Lookup_Position.aspx?formname1=form1.txtPosition&formname2=form1.lblPositionDesc','Lookup_Position_window','width=800,height=500, top=100,left=100');Lookup_Position_window.focus()">
<img src="images/lookup_pre.gif" border="0" id="Img2" />
</a>


** Pop-up window side **
strjscript &= "window.opener." & _
HttpContext.Current.Request.QueryString("formname1") & ".value = '" & _
gvPosition.SelectedRow.Cells(1).Text & "', window.opener." & _
HttpContext.Current.Request.QueryString("formname2") & ".value = '" & _
gvPosition.SelectedRow.Cells(2).Text & "';window.close();"
strjscript = strjscript & "</script" & ">
 
You're sending the literal name of your form variables, not the values in them.
Code:
<a href="javascript:Lookup_Position_window=window.open('Lookup_Position.aspx?formname1=' + form1.txtPosition.value + '&formname2=' + form1.lblPositionDesc.value,
 'Lookup_Position_window', 'width=800,height=500,top=100,left=100');
 Lookup_Position_window.focus()">
<img src="images/lookup_pre.gif" border="0" id="Img2" />
</a>

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top