473,387 Members | 1,669 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

querystring exceeds size limit using window.open

Ben
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>

May 16 '06 #1
8 6558
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.
May 16 '06 #2

"Ben" <bc*******@yahoo.com> wrote in message
news:11**********************@i40g2000cwc.googlegr 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.

May 16 '06 #3
Ben
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.

May 16 '06 #4
Ben
I was trying to stay away from Session Variables but it looks like I
need to use them. Thanks.

May 16 '06 #5
[Please quote what you are responding to]

Ben wrote:
Thanks, but this page is being posted back to itself so there
are many different ways to submit.


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 and ensure that target
is opened. I don't care how you implemented it -- my example was meant to
illustrate the use of TARGET.

Besides -- "posted back to itself" is inconsistent with passing "a large
number
of ID's using window.open". Are you saying that each successive instance of
the script will opsn another copy of itself into yet another popup window?
--
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.
May 17 '06 #6

"Ben" <bc*******@yahoo.com> wrote in message
news:11**********************@y43g2000cwc.googlegr 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.


May 17 '06 #7
Ben
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();
}

May 17 '06 #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.
May 17 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Fredrik/Sweden | last post by:
Hi folks ! got this problem... i have a table 'Accounts' in my database, which contains a bunch of users. From the main menu i choose "edit user" and all users in the db are presented in a table....
8
by: George | last post by:
VS.NET 2002/VB Is it possible to retrieve HTML form variables that are hidden input types using Request.QueryString() and/or Request.Form()? I have tried various ways of using those, but to no...
2
by: Jensen bredal | last post by:
Hello,I lunch a popup window from an aspx file . The javascript uses window.open . The problem is that the height parameter appears to have a limit and i cannot go below that limit. code below: ...
8
by: Praveen Chandra | last post by:
Hi I was trying to call the webservice of MS Project server (ProjectCreate interface of PDS) to create a new project. It works fine when the input XML is small with a few task and allocations. It...
1
by: Praveen Chandra | last post by:
Hi I was calling a third party webservice ( WSDL ) which is accepting some xml as input parameter. it works fine when the xml size is small but starts giving error when the xml size reached about...
2
by: murali.trichy | last post by:
hi, according to browser Querystring values are vary, for eg. IE - 2,083 Characters. In my application I'm transfering data from Javascript to Asp.Net through Query string. Eg: var http =...
7
by: fox | last post by:
Hi, Lacking javascript knowledge, I just realized why my project has a bug. I am using ASP to loop through a set of records while it creates URLs with a querystring that has a single value pair....
1
by: chrisj | last post by:
I'm using freeASPupload and got some assistance integrating to a Member script. It works successfully. In this modified version there are two groups that use this upload script. Members of one...
3
by: =?Utf-8?B?ZGlzcGxheW5hbWU=?= | last post by:
I have an ASP page with a button and other things. When the button is clicked, it executes a javascript function which does: document.Form1.method = 'post'; document.Form1.action =...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.