displayname wrote:
Quote:
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 = "AnotherASPpage.asp?p1=" + allFields1 +
"&p2=" + allFields2 + "&p3=" + bVar;
document.Form1.submit();
>
allFields1 represents all the fields in category 1 that user has
selected. The fields are delimited by comma.
allFields2 represents all the fields in category 2 that user has
selected. The fields are delimited by comma.
>
The AnotherASPpage.asp is supposed to display the result in Excel
spreadsheet.
>
I test it by selecting 15 fields in category 1 and it pops up a File
Download small window asking if I want to Open, Save, or Cancel the
Excel file. It shows an Excel name like abc.xls in the Name: section
in that small window. I can Save the file successfully.
>
But, when I select 16 fields in category 1, pops up a File Download
small window asking if I want to Open, Save, or Cancel the Excel
file. But, it doesn't show an Excel name like abc.xls in the Name:
section in that small window. It shows ..., id1%20AS%20... When I
click Save, it gives error about IE can't download ...&p3=...
>
It looks like the limit of the querystring in the URL is too long.
But with POST method the limit is huge and I'm no where near that
limit.
>
I am thinking about using hidden variables to pass data from one page
to another but I can't because onclick of a button page1 invokes a
javascript function which submits AnotherASPpage.asp and thus doesn't
know about the hidden variables from page1.
>
I don't understand the problem. In the form's onsubmit event, populate the
hidden elements with the required values. Forget about the querystring.
What's the problem?
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"