S
shookim
I've been looking all day for some code examples of how to pass a
variable throught a javascript pop up window. There's nothing decent
out there on the web...so after hours and hours of searching, I've
finally figured out how to do complete the code for passing a variable
to a window pop up and back.
(Main window)
create a window.open() function in your event, mine happens to be a
"Find" button.
<img src="images/Find1.gif" height=21
onclick="Javascript:window.open('Test6.asp?txtManagerName='+document.getElementById('txtManagers').value,
'wroxwindow', 'height=200, width=300, top=250, left=350, resizable=yes,
scrollable=yes, toolbar=no');">
the major problem I had was the exact syntax for passing the variable:
Test6.asp?txtManagerName='+document.getElementById('txtManagers').value
(you can name the value, doesn't have to be:
document.getElementById('txtManagers').value
could be...txtManagers, or whatever your variable being passed is.
(Pop up window)
Use a querystring command (vbscript)
<%
test = Request.QueryString("txtManagerName")
Response.Write "test = " & test
%>
That's it...
sk
variable throught a javascript pop up window. There's nothing decent
out there on the web...so after hours and hours of searching, I've
finally figured out how to do complete the code for passing a variable
to a window pop up and back.
(Main window)
create a window.open() function in your event, mine happens to be a
"Find" button.
<img src="images/Find1.gif" height=21
onclick="Javascript:window.open('Test6.asp?txtManagerName='+document.getElementById('txtManagers').value,
'wroxwindow', 'height=200, width=300, top=250, left=350, resizable=yes,
scrollable=yes, toolbar=no');">
the major problem I had was the exact syntax for passing the variable:
Test6.asp?txtManagerName='+document.getElementById('txtManagers').value
(you can name the value, doesn't have to be:
document.getElementById('txtManagers').value
could be...txtManagers, or whatever your variable being passed is.
(Pop up window)
Use a querystring command (vbscript)
<%
test = Request.QueryString("txtManagerName")
Response.Write "test = " & test
%>
That's it...
sk