Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Variable Help

Reply
Thread Tools

Variable Help

 
 
Mangler
Guest
Posts: n/a
 
      03-16-2007
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;dial ogWidth:
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=<%=Reque st.Form("sku")%>'


Any suggestions?

 
Reply With Quote
 
 
 
 
Trevor L.
Guest
Posts: n/a
 
      03-17-2007
Mangler wrote:
> 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;dial ogWidth:
> 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=<%=Reque st.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/
----------------------------------------

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Variable variable name" or "variable lvalue" mfglinux Python 11 09-12-2007 03:08 AM
how to implement variable ports with variable width? weijun VHDL 4 12-19-2005 05:16 PM
Variable 'variable lengths' Taras_96 VHDL 2 05-09-2005 12:58 AM
Convert Character Variable to Integer Variable Brad Smallridge VHDL 2 11-18-2004 01:56 AM
How do I scope a variable if the variable name contains a variable? David Filmer Perl Misc 19 05-21-2004 03:55 PM



Advertisments