General discussion

Locked

Passing Values to a Popup Page in ASP

By dfoley ·
I have created a menu page where the user enters the CallID number that they want to take the quiz on. Then a CallReport page opens in that page, and i have set up an onload function for a quiz to pop up, but i need the callid to pass onto this quizpage. I cant figure it out. Any ideas?

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by beta611 In reply to Passing Values to a Popup ...

Is this call client side or sever side? one way to do it is to pass the values using a querystring to the loading page if the call is server side. then the loading page can take the value from the querystring.
if its client side code suchas javascript you could do something like this:
var arryArgs = new Array ("1","2","3");
var results = window.showModalDialog("myhtml.htm",arryArgs);

Collapse -

by kiddanger In reply to Passing Values to a Popup ...

"I have created a menu page where the user enters the CallID number that they want to take the quiz on."

I assume this means they are filling in a form text field and then they are redirected to a specific page.

If so, on the form entry page: (using [] instead of <&gt

[script type="text/javascript"]
function goCallReport() {
var icallid;
icallid = document.callidform.callid;
if(!icallid.value) {
alert('CallID field cannot be blank');
icallid.focus();
return false;
} else {
var ecallid='';
ecallid='callreport.asp?' + icallid.value;
document.callidform.action=ecallid;
return true;
}
}
[/script]

[form name="callidform" method="get" onSubmit="goCallReport()"]
[input type=text value="" id="callid" name="callid" /]Enter call ID
[/form]

In the callreport page:
<%@ LANGUAGE=VBScript %>
<%
Option Explicit
dim callid
callid = Trim(Request.QueryString("callid"))
%>
<html>
...
<body onload="quizpop(<%=callid%>)">
...
</html>

Back to Web Development Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums