pass value from Javascript to asp page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • eddie wang

    pass value from Javascript to asp page

    I have one asp page with javascript to begin. In the Javascript, I have
    drop down list value. How can I passdrop value to asp page easily? For
    example, if the user selects the value, the asp page will refresh itself
    with the new value right away. Thanks.

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
  • Michael Winter

    #2
    Re: pass value from Javascript to asp page

    On 17 Feb 2004 14:50:02 GMT, eddie wang <ewang@kmg.co m> wrote:
    [color=blue]
    > I have one asp page with javascript to begin. In the Javascript, I have
    > drop down list value. How can I passdrop value to asp page easily? For
    > example, if the user selects the value, the asp page will refresh itself
    > with the new value right away. Thanks.[/color]

    Either submit the value as part of a form, or append the value to the URL:

    window.location = 'somePage.asp?l ist=' + dropValue;

    The former is preferred as it should work on JavaScript-disabled browsers,
    other circumstances willing.

    Mike

    --
    Michael Winter
    M.Winter@blueyo nder.co.invalid (replace ".invalid" with ".uk" to reply)

    Comment

    • eddie wang

      #3
      Re: pass value from Javascript to asp page

      Thanks for the reply. Can I store the value in cookies and retrive it
      then?


      *** Sent via Developersdex http://www.developersdex.com ***
      Don't just participate in USENET...get rewarded for it!

      Comment

      • Michael Winter

        #4
        Re: pass value from Javascript to asp page

        On 17 Feb 2004 17:00:17 GMT, eddie wang <ewang@kmg.co m> wrote:
        [color=blue]
        > Thanks for the reply. Can I store the value in cookies and retrive it
        > then?[/color]

        Certainly, as long as the user allows cookies.

        Mike

        --
        Michael Winter
        M.Winter@blueyo nder.co.invalid (replace ".invalid" with ".uk" to reply)

        Comment

        Working...