|
-
Mar 19th, 2002, 09:18 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] Easy Question
HOw can I get the user input value using select on vbscript?
<select bblahblahblah onchange=dothis>
<option>
<option>
</select>
If a post has helped you then Please Rate it!
-
Mar 20th, 2002, 03:21 AM
#2
Fanatic Member
Its the same as Javascript really... but you're not familiar with Javascript then heres an example
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>VBScript Dom</title>
<script language="VBScript">
<!--
Function getSelect(objectID)
Msgbox ("Value " & document.getElementById(objectID).value & " selectedIndex " & document.getElementById(objectID).selectedIndex)
End Function
//-->
</script>
</head>
<body>
<select name="selectbox" id="selectbox" onchange="getSelect('selectbox')">
<option value="item1">Item1</option>
<option value="item2">Item2</option>
<option value="item3">Item3</option>
</select>
</body>
</html>
.value returns option value
.selectedIndex returns an number of the current selected item where 0 is the top
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|