How can I do a postback w/querystring from a DropDownList

Last post 04-24-2006 9:21 PM by Markvillahermosa. 3 replies.

Sort Posts:

  • How can I do a postback w/querystring from a DropDownList

    04-24-2006, 7:05 PM
    • Member
      305 point Member
    • toadface
    • Member since 07-08-2002, 7:37 PM
    • Posts 61

    Hello,

    I'm needed to update the querystring after the user changes the value in the DropDownList.

    I think this can be done with javascript, but I can't figure out how to do it!

    Thanks for any help!

  • Re: How can I do a postback w/querystring from a DropDownList

    04-24-2006, 9:14 PM
    • Member
      265 point Member
    • Markvillahermosa
    • Member since 07-29-2004, 9:52 PM
    • Dumaguete City, Philippines
    • Posts 53
    Hi there,

    You can add an attribute to the drop down which can call a javascript function. It is best placed in the page_load event.

    dropdown.attributes.add("onChange","MyJavaScriptFunction()")

    The function is called every time the selected item is changed.

    HTH,
    MarkV
    Mark V. Villahermosa
    Dumaguete City, Philippines
    Software Developer
  • Re: How can I do a postback w/querystring from a DropDownList

    04-24-2006, 9:20 PM
    • Member
      305 point Member
    • toadface
    • Member since 07-08-2002, 7:37 PM
    • Posts 61

    Thanks for the reply!

    Yes, that's actually the part that I know how to do.  It's how to you pass the selected value of the dropdown to the java function that I don't know how to do.  Actually, I'm needing an example of the entire java function.  The function should do the postback --- how do I do the postback with a querystring?

    Thanks

  • Re: How can I do a postback w/querystring from a DropDownList

    04-24-2006, 9:21 PM
    • Member
      265 point Member
    • Markvillahermosa
    • Member since 07-29-2004, 9:52 PM
    • Dumaguete City, Philippines
    • Posts 53
    BTW, i think the request.querystring is a readonly property. So you have to redirect it to add or change the querystring values...
    Mark V. Villahermosa
    Dumaguete City, Philippines
    Software Developer
Page 1 of 1 (4 items)