Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DropDown nightmare

Status
Not open for further replies.

NevG

Programmer
Oct 10, 2000
162
GB
Can somebody please tell me how , either through vbscript or ASP <% %> tags I can place the text of a selected item in a dopdown box into a variable.

I have been trying to use cboIssuer.text

cboIssuer.selectedindex etc..................

Somebody please, tel me !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Thanks

Nev [sig][/sig]
 
Hi Nev,

please try this.. hope this can you

<html>
<script>
function Go(form) {
alert(form.Menu.options[form.Menu.selectedIndex].text)
}
</script>

<body>
<form>
<SELECT name=&quot;Menu&quot; OnChange=&quot;Go(this.form)&quot;>
<option value=&quot;Menu&quot; selected>Menu
<option value=&quot;ChPass&quot;>Change Password
<option value=&quot;ShowR&quot;>Show Rates
<option value=&quot;Report&quot;>Reports
<option value=&quot;Setting&quot;>Settings
<option value=&quot;Logout&quot;>Logout
</select></td>
</form>
</body>
</html>

to get the variable called &quot;(form.Menu.options[form.Menu.selectedIndex].text)&quot;

hope this helps [sig]<p>Chiu Chan<br><a href=mailto:cchan@gefmus.com>cchan@gefmus.com</a><br><a href= America, Inc</a><br>[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top