0

Hi I have the following page with a query string: http://userpages.umbc.edu/~andrade1/querystring/querystring/example1%20-%20Copy.html

when I click show and go to the receiving page which is here: http://userpages.umbc.edu/~andrade1/querystring/querystring/example123.html?name=Duck%2C%20Donald&spouse=Daisy

How can I retrieve the query string so that the drop down menu will display the name which is donald duck or mickey depending which button was clicked and the input box will display either minnie or daisy depending which button was clicked?

For example when the show button for mickey mouse is clicked I want mickey mouse to display in the drop down menu but still be able to select other options after the page is loaded and I would like minnie to display in the input box but be able to also type in another value.

Currently the javascript that I am using is:

<script type="text/javascript">
        <!--
        document.write("Name: " + Request.QueryString("spouse"));

        // -->
    </script>

which does not work for a drop down menu or input box

john
  • 1
  • 1

1 Answers1

0

use location.search

JavaScript query string

Community
  • 1
  • 1
James Kyburz
  • 11,891
  • 1
  • 29
  • 33