homepage Welcome to WebmasterWorld Guest from 54.196.225.45
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Large string can not pass in IE with query string
What maximum chars pass to a page with query string?
ywang




msg:587926
 10:07 pm on Nov 13, 2003 (gmt 0)

Hi Pro.

In IE 6.0, two jsp pages, getting values in javascript and then using window.open("child.jsp?a=aaa&b=bbb", "windName", feature ) to pass all query to and open child jsp page.

If the query string is less than about 1350 chars, no problem to open jsp and get correct data in child jsp.

But, once query string is hug then either had "Error: Invalid Pointer" in that window.open line, or the part of data in child page was "null".

I tested same thing in NS 7.0, there is no any problem and works well, can any Pro here give me a help?

Or, is there any way to get huge string from parent page to child page without using query, session and cookies?

Thank you very much!

 

tedster




msg:587927
 1:41 am on Nov 14, 2003 (gmt 0)

How about writing all those characters to a memo field in a database on the server. Then you can pass the ID of that db record in your query string, and the child page can retrieve the record.

That should keep you from bumping into whatever limits exist on various browsers -- and there will be such limits although they will vary from browser to browser.

pageoneresults




msg:587928
 2:03 am on Nov 14, 2003 (gmt 0)

I'd go with tedster's suggestion. I believe the max URI length is 4,095 and the max query string length is 2,053, this applies to IE6. As tedster pointed out, it does vary from browser to browser. I too had issues with this a year ago and we had to rethink the strategy of the query.

ywang




msg:587929
 4:00 pm on Nov 14, 2003 (gmt 0)

Thanks tedster and pageoneresults. Even we use database, we still neeed to pull value from textarea from page when you click submit.

But how to get this hug value from textarea? Besides Javascript, is there any others way to get data from textarea to db?

rpking




msg:587930
 4:55 pm on Nov 14, 2003 (gmt 0)

Can you not just post the data? There's no limit on post data sizes...

ywang




msg:587931
 7:28 pm on Nov 14, 2003 (gmt 0)

RpKing,

Yes, I did only post data to child jsp in javascript like:

.......................

var features = 'height=600,width=820,scrollbars=yes,resizable=yes,toolbar=yes,menubar=yes,location=yes,status=yes';
var longvalues = document.splotListForm.testarea.value;
var pagetool = "redirectUsetool.jsp?SplotNum=" + longvalues windowHandle = window.open(pagetool,'windowName',features);

............................

In that textarea of parent page, I typed in over one thousand chars.

rpking




msg:587932
 9:07 am on Nov 19, 2003 (gmt 0)

That doesn't look like a post though... you are still using a querystring.

Use some code such as:
--------------------------------
<script>
function popUpResult(){
window.open('about:blank','childwindow', 'height=500,width=350');
myForm.target = 'childwindow';
}
</script>

<form name="myForm" method="post" action="childpage.jsp" onSubmit="popUpResult()">
<textarea></textarea>
<input type="submit" />
</form>
--------------------------------

When you submit this form, a popup window is opened called childwindow.

The target of the form is then set to this popup and the form is posted to childpage.jsp.

This causes the post to take place in the popup window, enabling you to pass as much data across as possible.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved