querystring exceeds size limit using window.open

Discussion in 'ASP General' started by Ben, May 16, 2006.

  1. Ben

    Ben Guest

    Thanks in advance for any help. I am attempting to pass a large number
    of ID's using window.open in javascript. The number of the ID's exceeds
    the querystring length. Therefore, I would like to somehow use the POST
    method to submit. (or another method without rewriting the ASP page!)
    Please review the code below before submitting since this can be easily
    done but I am not sure how using <body onload... >.

    %>
    <body onload="myFunc('<%=request("wid")%>')"></body>
    <%

    <script language=javascript>
    function myFunc(w2)
    {
    var args = "&wono=" + w2;

    window.open("test_alert.asp?"+args,
    null,'width=600,height=550,scrollbars=yes,resizable=yes,status=yes,top=10,left=50');

    }
    </script>
     
    Ben, May 16, 2006
    #1
    1. Advertising

  2. Ben wrote:
    > Thanks in advance for any help. I am attempting to pass a large
    > number of ID's using window.open in javascript. The number of
    > the ID's exceeds the querystring length. Therefore, I would
    > like to somehow use the POST method to submit...


    This is not really an ASP question, but...

    <form method="post"
    action="test_alert.asp"
    target="windowName"
    onsubmit="window.open('','windowName','width=600,height=550...')">


    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms.
     
    Dave Anderson, May 16, 2006
    #2
    1. Advertising

  3. "Ben" <> wrote in message
    news:...
    > Thanks in advance for any help. I am attempting to pass a large number
    > of ID's using window.open in javascript. The number of the ID's exceeds
    > the querystring length. Therefore, I would like to somehow use the POST
    > method to submit. (or another method without rewriting the ASP page!)
    > Please review the code below before submitting since this can be easily
    > done but I am not sure how using <body onload... >.
    >
    > %>
    > <body onload="myFunc('<%=request("wid")%>')"></body>
    > <%
    >
    > <script language=javascript>
    > function myFunc(w2)
    > {
    > var args = "&wono=" + w2;
    >
    > window.open("test_alert.asp?"+args,
    >

    null,'width=600,height=550,scrollbars=yes,resizable=yes,status=yes,top=10,le
    ft=50');
    >
    > }
    > </script>
    >


    Changing to POST method WILL require some changes to the page.

    Since the data for the Test_alert.asp page is already on the server why not
    store it somewhere and just send a tag for the data to the client.

    The Test_alert can use the tag to retrieve the actual data.

    Anthony.
     
    Anthony Jones, May 16, 2006
    #3
  4. Ben

    Ben Guest

    Thanks, but this page is being posted back to itself so there are many
    different ways to submit. You are right... more javascript than an ASP
    post. Sorry about that.
     
    Ben, May 16, 2006
    #4
  5. Ben

    Ben Guest

    I was trying to stay away from Session Variables but it looks like I
    need to use them. Thanks.
     
    Ben, May 16, 2006
    #5
  6. "Ben" <> wrote in message
    news:...
    > I was trying to stay away from Session Variables but it looks like I
    > need to use them. Thanks.
    >


    A session variable is one way of doing it but not the only way. You could
    use a table in an DB as an alternative.
     
    Anthony Jones, May 17, 2006
    #6
  7. Ben

    Ben Guest

    Dave wrote:
    > I think you are missing the point. If you want to POST a form into a popup
    > window, use the TARGET attribute of the FORM element


    Thanks Dave... I appreciate your help. Maybe I should be getting away
    from <body onload...
    Anyway, below is my lastest attempt... opens the new window but no data
    submitted to new window. Can you see the problem?

    <form name="frmTemp" action="wor_alert.asp" method="POST"
    target="newWin">
    <input type="hidden" name="wono"
    value="<%=request("wono")%>">
    </form>

    <body onload="myFunc1();"></body>

    function myFunc1() {
    var newWin =
    window.open("wor_alert.asp","newWin","width=600,height=550,scrollbars=yes,resizable=yes,status=yes,top=10,left=50");
    newWin.document.frmTemp.submit();
    }
     
    Ben, May 17, 2006
    #7
  8. Ben wrote:
    > Anyway, below is my lastest attempt... opens the new window
    > but no data submitted to new window. Can you see the problem?


    Yes:
    > window.open("wor_alert.asp","newWin","width=600...");


    That should be:
    window.open("","newWin","width=600...");



    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms.
     
    Dave Anderson, May 17, 2006
    #8
    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. Replies:
    5
    Views:
    3,070
  2. Replies:
    14
    Views:
    909
    Mark McIntyre
    Jan 28, 2006
  3. Replies:
    1
    Views:
    1,089
    Victor Bazarov
    Jun 28, 2005
  4. Adam Eccleshall

    Alternative options for when QueryString exceeds IE URL length lim

    Adam Eccleshall, Aug 19, 2009, in forum: ASP .Net Web Services
    Replies:
    3
    Views:
    1,237
    Patrice
    Sep 1, 2009
  5. Replies:
    2
    Views:
    352
    Eric Sosman
    Dec 17, 2013
Loading...

Share This Page