Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > querystring exceeds size limit using window.open

Reply
Thread Tools

querystring exceeds size limit using window.open

 
 
Ben
Guest
Posts: n/a
 
      05-16-2006
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,resizabl e=yes,status=yes,top=10,left=50');

}
</script>

 
Reply With Quote
 
 
 
 
Dave Anderson
Guest
Posts: n/a
 
      05-16-2006
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,h eight=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.


 
Reply With Quote
 
 
 
 
Anthony Jones
Guest
Posts: n/a
 
      05-16-2006

"Ben" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> 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,resizabl e=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.



 
Reply With Quote
 
Ben
Guest
Posts: n/a
 
      05-16-2006
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.

 
Reply With Quote
 
Ben
Guest
Posts: n/a
 
      05-16-2006
I was trying to stay away from Session Variables but it looks like I
need to use them. Thanks.

 
Reply With Quote
 
Anthony Jones
Guest
Posts: n/a
 
      05-17-2006

"Ben" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> 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.




 
Reply With Quote
 
Ben
Guest
Posts: n/a
 
      05-17-2006
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,he ight=550,scrollbars=yes,resizable=yes,status=yes,t op=10,left=50");
newWin.document.frmTemp.submit();
}

 
Reply With Quote
 
Dave Anderson
Guest
Posts: n/a
 
      05-17-2006
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.


 
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
Alternative options for when QueryString exceeds IE URL length lim Adam Eccleshall ASP .Net Web Services 3 09-01-2009 11:21 AM
Requested array size exceeds VM limit... aa@dsa-ac.de Java 5 11-28-2006 09:29 AM
writing binary data whose size exceeds unsinged it mohammad.nabil.h@gmail.com C Programming 14 01-28-2006 12:18 PM
c program, file size limit, how to solve? 2G bytes limit. guru.slt@gmail.com C++ 1 06-27-2005 11:05 PM
Thunderbird - message exceeds the Maximum Message Size? Gerry Firefox 0 02-18-2005 06:39 PM



Advertisments