Variable Help

Discussion in 'ASP General' started by Mangler, Mar 16, 2007.

  1. Mangler

    Mangler Guest

    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?
     
    Mangler, Mar 16, 2007
    #1
    1. Advertising

  2. Mangler

    Trevor L. Guest

    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;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/
    ----------------------------------------
     
    Trevor L., Mar 17, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brad Smallridge
    Replies:
    2
    Views:
    2,714
    Brad Smallridge
    Nov 18, 2004
  2. Taras_96

    Variable 'variable lengths'

    Taras_96, May 8, 2005, in forum: VHDL
    Replies:
    2
    Views:
    518
    Taras_96
    May 9, 2005
  3. weijun
    Replies:
    4
    Views:
    635
  4. mfglinux
    Replies:
    11
    Views:
    754
    Roberto Bonvallet
    Sep 12, 2007
  5. David Filmer
    Replies:
    19
    Views:
    282
    Kevin Collins
    May 21, 2004
Loading...

Share This Page