timmr72
asked on
Passing multiple variables in a javascript popup to another popup
I'm not sure if I'm providing enough information here:
Basically, I have a popup window that is generated by some javascript (I found the javascript on a "get a free script" site and it worked rather well for me). Rather, it worked very well when I only passed one variable from this popup window to another popup window. Now, I need to come back to this several months later and pass two variables from this page to the next. Here's what I have:
<script language="JavaScript" src="/resources/popup.js"> </script>
<form name="Custom" method="post" action="javascript:CreateW nd('srvpat ch.asp?Ser ver5=<%=st rServer%>' , 500, 700, true);"
<input name="Server5" type="hidden" value="<%=strServer%>">
<input type="submit" value="View"> <strong><font color="#008080">Missing Patch Status</font></strong><BR>
</FORM>
I tried a few different things:
<form name="Custom" method="post" action="javascript:CreateW nd('srvpat ch.asp?Ser ver5=<%=st rServer%>' , 500, 700, true);"
<input name="Server1" type="hidden" value="<%=strServer%>">
<input name="Server2" type="hidden" value="<%=strServer%>">
<input type="submit" value="View"> <strong><font color="#008080">Missing Patch Status</font></strong><BR>
</FORM>
However, it would seem that the variable being passed is being passed from here instead:
action="javascript:CreateW nd('srvpat ch.asp?Ser ver5=<%=st rServer%>' , 500, 700, true);"
How can I alter this line to pass more than one variable? Is there a better way to do this? Speaking down to me is encouraged as I'm not very good at this :)
Thanks,
Tim
Basically, I have a popup window that is generated by some javascript (I found the javascript on a "get a free script" site and it worked rather well for me). Rather, it worked very well when I only passed one variable from this popup window to another popup window. Now, I need to come back to this several months later and pass two variables from this page to the next. Here's what I have:
<script language="JavaScript" src="/resources/popup.js">
<form name="Custom" method="post" action="javascript:CreateW
<input name="Server5" type="hidden" value="<%=strServer%>">
<input type="submit" value="View"> <strong><font color="#008080">Missing Patch Status</font></strong><BR>
</FORM>
I tried a few different things:
<form name="Custom" method="post" action="javascript:CreateW
<input name="Server1" type="hidden" value="<%=strServer%>">
<input name="Server2" type="hidden" value="<%=strServer%>">
<input type="submit" value="View"> <strong><font color="#008080">Missing Patch Status</font></strong><BR>
</FORM>
However, it would seem that the variable being passed is being passed from here instead:
action="javascript:CreateW
How can I alter this line to pass more than one variable? Is there a better way to do this? Speaking down to me is encouraged as I'm not very good at this :)
Thanks,
Tim
ASKER
I'm getting a type mismatch when I try your example. You are correct though, that's exactly what I'm trying to do.
Thanks
Thanks
There is obviously a problem in creating the string. LEts try this :)
var lstrURL
lstrURL = "srvpatch.asp?Server5=<%=s trServer%> &Server2=< %=strServe r2%>"
alert (lstrURL);
CreateWnd(lstrURL, 500, 700, true);"
or we can also use
window.open(lstrURL, 500, 700, true);
Please try and let me know
Thanks
KM
var lstrURL
lstrURL = "srvpatch.asp?Server5=<%=s
alert (lstrURL);
CreateWnd(lstrURL, 500, 700, true);"
or we can also use
window.open(lstrURL, 500, 700, true);
Please try and let me know
Thanks
KM
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yup. That seemed to do the trick for me :)
I bumped up the points to 200. Thank you very much for the quick assistance.
Thanks again,
-Tim
I bumped up the points to 200. Thank you very much for the quick assistance.
Thanks again,
-Tim
action="javascript:CreateW
If I misunderstood your question, please elaborate.
Thanks
KM