You might try javascript function escape(str)

--- Andy Mayer <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> This is a question about JavaScript to Servlet
> communication. Although the
> problem is straightforward, I have included a
> lengthy explanation to
> communicate it to you as best as I can...
>
> I am writing a Servlet that has for it's graphical
> front-end some JavaScript
> involving drag and drop functionality. Basically the
> user drags some area of
> the page to a target, and this sends data back to
> the servlet. The problem
> is that the data sent is a URL with parameters, for
> example the Yahoo stock
> quote site:
>
> http://finance.yahoo.com/q?s=LNUX&d=v1
>
> So the JavaScript call to my servlet looks like the
> following, with the
> parameter called "data"
>
>
http://www.myhost.com/servlets/package.servlet?data=http://finance.yahoo.com
> /q?s=LNUX&d=v1
>
> What happens is that  the Servlet parameter "data"
> only contains
> "http://finance.yahoo.com/q?s=LNUX" and is missing
> the rest of the line
> (i.e. &d=v1 in this example)
>
> I guess, I need to code the URL using Javascript to
> remove the &'s  before
> sending it to the servlet, and then decode the URL
> by my servlet.
>
> Are there standard encoding and decoding functions
> that I should use on the
> JavaScript and Servlet side? Is there a standard way
> of doing this, or do I
> have to invent the wheel?
>
> Many thanks,
>
> Andy
> -----
> www.andymayer.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


__________________________________________________
Do You Yahoo!?
Yahoo! Mail � Free email you can access from anywhere!
http://mail.yahoo.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

Reply via email to