Is there a limit to the POST method ? (someone mentioned a ball figure of 64
K)

-----Original Message-----
From: Bill Lynch <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Tuesday, August 10, 1999 6:44 AM
Subject: Re: JavaScript to Servlet


Patrick,

On Mon, 9 Aug 1999, Patrick B. Munis wrote:
> Hi
>     I am passing 2  query string  variables appended to a url from
JavaScript to a
servlet. For
> some unknown reason(S) the servlet (or is it the browser ?)truncates the
values of the
second
> query string.These string(strMessage, strValue) is  long and dynamically
generated.
Could
> you/anyone explain why this is happenning and is there a work around. The
following
explains
> concretely what I am trying to accomplish.

there is a limit to the length of a GET... i think it's 255 characters
so
if your url is over that it will be truncated. you might want to do a
POST
instead. in that case you won't be able to make a query string in
javascript so you'll have to use forms to submit it. (but you can get
and
set all the properties of html forms with javascript)

more below...

> <script>
> QueryString value=strValue&message=strMessage
>
> function saveZipCodeSet(strMessage, strValue) {
> var url = '/servlet/zipcode.servlet.SaveZipCodeSetServlet?value=\' +
strValue +
> '&message=' + strMessage
> var urlFixed = escape(url)
> var htmlString = '<HTML> <Head><title>Dummy Page</title> </head> <BODY>';
> htmlString = htmlString + \"<a href=\" + url +  \">\";
> htmlString = htmlString + '</Body> </Html>';
> document.saveIFrame.document.open();
> document.saveIFrame.document.write(htmlString);
> document.saveIFrame.document.close()
> document.saveIFrame.document.links[0].click();
> }

what are you trying to do? it looks like you're making the url and then
trying to go to it -- you can do this just by doing

location.href = url;
or just
location = url;

after that the browser will go to that URL.


--Bill

--
Bill Lynch -- [EMAIL PROTECTED] ----------------------
   University of Iowa -- http://www.cs.uiowa.edu/~bmlynch
   CoolServlets.com   -- http://www.coolservlets.com
---------------------------------------------------------

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to