Getting form parameters

Discussion in 'Javascript' started by Zvonko, Nov 15, 2005.

  1. Zvonko

    Zvonko Guest

    Hi!

    How do I get form parameters (about dozen of them) from URL using
    JavaScript?


    The explanation. My host provider can not configure Tomcat to work
    under SSL. So I am wondering how to get the parameters from the form
    using GET method and JavaScript? Is it encrypted when the whole thing is
    going on under SSL? I am afraid because the whole form data is in the
    header (inside URL).

    Please provide any help.


    Thanx in advance,
    Zvonko
    Zvonko, Nov 15, 2005
    #1
    1. Advertising

  2. Zvonko wrote:

    > How do I get form parameters (about dozen of them) from URL using
    > JavaScript?


    Use the `location.search' property if supported.

    > [...] Is it encrypted when the whole thing is going on under SSL?


    <http://en.wikipedia.org/wiki/Secure_Sockets_Layer>

    > I am afraid because the whole form data is in the header (inside URL).


    This will create problems as some UAs, including IE, impose a
    nonstandard restriction on the length of supported URI references.

    You better get a better service provider.


    PointedEars
    Thomas 'PointedEars' Lahn, Nov 15, 2005
    #2
    1. Advertising

  3. Jasen Betts wrote:

    > On 2005-11-15, Zvonko <> wrote:
    >> How do I get form parameters (about dozen of them) from URL using
    >> JavaScript?

    >
    > They are urlencoded. I think there is a function to undo that.


    proprietary and ASCII-safe: unescape()
    standards compliant and UTF-16-safe: decodeURL(), decodeURLComponent()

    >> The explanation. My host provider can not configure Tomcat to work
    >> under SSL. So I am wondering how to get the parameters from the form
    >> using GET method and JavaScript? Is it encrypted when the whole thing is
    >> going on under SSL? I am afraid because the whole form data is in the
    >> header (inside URL).

    >
    > I don't know what you're trying to do. I am not familiar with toomcat.


    <http://tomcat.apache.org/>

    > The browser won't see the encrypted form, only the decrypted form.


    Not true. The browser (generally: the user agent) has to decrypt the data
    stream received from the server and then parse it. Which is why you cannot
    connect to a server requiring 128-bit encryption using a browser which only
    supports 64-bit encryption mechanism. However, the data the script engine
    receives from the UA is already decrypted.


    PointedEars
    Thomas 'PointedEars' Lahn, Nov 16, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jonck van der Kogel
    Replies:
    2
    Views:
    958
    Jonck van der Kogel
    May 27, 2004
  2. Replies:
    1
    Views:
    3,886
    Tim B
    Jan 7, 2006
  3. Jason
    Replies:
    2
    Views:
    487
    Jonathan Mcdougall
    May 13, 2006
  4. kito
    Replies:
    2
    Views:
    395
  5. Florian Loitsch
    Replies:
    11
    Views:
    234
    Michael Winter
    Mar 15, 2005
Loading...

Share This Page