troubleshooting Question

Javascript help retaining correct drop down list description

Avatar of cofcmgr
cofcmgr asked on
JavaScripting Languages
4 Comments1 Solution189 ViewsLast Modified:
I need to be able to retain the selected text in the drop down list.  For example:  The drop down list default is "Choose a product to manage".  When I select "Enterprise" I want to be able to retain "Enterprise" instead of reverting back to "Choose a product to manage" description when the page refreshes with new content.  The javascript and form are as:

<script language="javascript">
function nav(){
   var w = document.Products.Global.selectedIndex;
   var url_add = document.Products.Global.options[w].value;
   window.location.href = url_add;  
   }
</script>
</head>

<body>
<form style="margin-top: 0px;" name="Products">
<select id="Global" name="Global" onchange="nav()" class="text" style="font-size: 10px;">
            <option value="1">Choose a product to manage</option>
            <option value="?hilite=WSE">Enterprise</option>
            <option value="?hilite=WSX">Express</option>
            <option value="?hilite=WSS">Security</option>
            <option value="?hilite=CPS">Content</option>
</select>
</form>
</body>
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros