Request.Form equivalent in client side javascript?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sergio Otoya

    #1

    Request.Form equivalent in client side javascript?

    Hi all,

    I have a potentially simple question...

    I need to keep the value of a field between form posts?
    I was thinking of using the equivalent of Request.Form("F ield1") in
    javascript to set the value of the field on the body onload event? is
    this possible in javascript?
    Is there are simple way to do this?

    Any help would be appreciated.

    Thanks in advance.

    Sergio.
  • Martin Honnen

    #2
    Re: Request.Form equivalent in client side javascript?



    Sergio Otoya wrote:
    [color=blue]
    > I need to keep the value of a field between form posts?
    > I was thinking of using the equivalent of Request.Form("F ield1") in
    > javascript to set the value of the field on the body onload event? is
    > this possible in javascript?[/color]

    You cannot post to a static HTML page so there should be some
    server-side page processing your post data which could then create the
    script for the client with the right objects.
    Client-side JavaScript on the receiving page itself has no access to
    post data.
    With the GET method you can read out and parse
    location.search

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/

    Comment

    • kaeli

      #3
      Re: Request.Form equivalent in client side javascript?

      In article <3392f577.04071 40350.62f85af@p osting.google.c om>,
      sergio@winapp.c om.au enlightened us with...[color=blue]
      >
      > I need to keep the value of a field between form posts?
      > I was thinking of using the equivalent of Request.Form("F ield1") in
      > javascript to set the value of the field on the body onload event? is
      > this possible in javascript?[/color]

      There is no equivalent to Request.Form in client-side javascript.
      [color=blue]
      > Is there are simple way to do this?[/color]

      Sure. Use the URL. Use GET to pass the form, then parse the URL to get
      the value(s) as needed.



      --
      --
      ~kaeli~
      Suicide is the most sincere form of self-criticism.



      Comment

      Working...