Variable Help

M

Mangler

I have a quick lookup page that opens in a small window and when the
form on that page is submitted the results page is open in a smaller
window as well. I have everything working except passing the variable
to the results page. Hopefully someone can help me here:

Code...

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openMDialog(theURL,args,features) { //v2.0
var returnedValue = window.showModalDialog(theURL,args,features);
eval (returnedValue);
}
//-->
</script>

<form action="javascript:;" method="get" name="frmdte"
class="thinBorderGrey" id="frmdte"
onsubmit="MM_openMDialog('showsku.asp','','center:yes;help:no;resizable:no;scroll:yes;status:no;dialogWidth:
450px;dialogHeight:300px')">
<table width="100%" border="0" cellpadding="6" cellspacing="0"
class="thinBorderGrey">
<tr>
<td><div align="center">
<input name="sku" type="text" id="sku" />
&nbsp; </div>
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><div align="center">
<p>
<input type="submit" name="Submit" value="Submit"/>
</p>
</div>
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> </td>
</tr>
</table>
</form>


The field "sku" will not pass to the next page, even if I add:

onsubmit="MM_openMDialog('showsku.asp?sku=<%=Request.Form("sku")%>'


Any suggestions?
 
T

Trevor L.

Mangler said:
I have a quick lookup page that opens in a small window and when the
form on that page is submitted the results page is open in a smaller
window as well. I have everything working except passing the variable
to the results page. Hopefully someone can help me here:

Code...

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openMDialog(theURL,args,features) { //v2.0
var returnedValue = window.showModalDialog(theURL,args,features);
eval (returnedValue);
}
//-->
</script>

<form action="javascript:;" method="get" name="frmdte"
class="thinBorderGrey" id="frmdte"
onsubmit="MM_openMDialog('showsku.asp','','center:yes;help:no;resizable:no;scroll:yes;status:no;dialogWidth:
450px;dialogHeight:300px')">
<table width="100%" border="0" cellpadding="6" cellspacing="0"
class="thinBorderGrey">
<tr>
<td><div align="center">
<input name="sku" type="text" id="sku" />
&nbsp; </div>
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><div align="center">
<p>
<input type="submit" name="Submit" value="Submit"/>
</p>
</div>
</td>
</tr>
<tr>
<td bgcolor="#FFFFFF"> </td>
</tr>
</table>
</form>


The field "sku" will not pass to the next page, even if I add:

onsubmit="MM_openMDialog('showsku.asp?sku=<%=Request.Form("sku")%>'


Any suggestions?

Well, I am not an expert on ASP, but I have put together a couple of pages.

What I use is:
<form action="xxxxx.asp" method="post">

Submit should then open "xxxxx.asp" and pass to it the variables contained
in the form.

These can then be retrieved in "xxxxx.asp" by <%=Request("sku")> or strictly
speaking <%=Request.Form("sku")>
--
Cheers,
Trevor L.
[ Microsoft MVP - FrontPage ]
MVPS Website: http://trevorl.mvps.org/
----------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top