|
-
Nov 17th, 2000, 05:24 PM
#1
Thread Starter
Hyperactive Member
Hi,
I'm using VBScript and I was wondering if someone had an example or even advise on grabbing the selected text of a dropdown(not a problem) and updating the page everytime a new selection is chosen(this is my problem). Can anyone help?
-
Nov 17th, 2000, 06:13 PM
#2
Frenzied Member
Depends on what you need to update. If the data is relatively small, you can store it within the page in arrays that have page scope. These arrays can be used to populate other fields and select/option groups based on the selections of another.
Basically you have to create client side code using server side code.
oOOo--oOOo
__ /\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP
[email protected]
[email protected]
Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
-
Nov 18th, 2000, 10:33 PM
#3
Thread Starter
Hyperactive Member
Ok that's helpful but I'm dealing with alot of info in a database. What I really need to know is what action is triggered when I select an option, how can I take the option's value and put it into a Sql statement, and have it executed by the page by recalling itself?
-
Jul 12th, 2006, 10:12 PM
#4
Fanatic Member
Re: dropdown select action?
you can use the 'OnChange' event for the select object:
<form name="order" method="post">
<select name="products" onchange="doSomething()">
where 'doSomething' is a function that performs your action(s).
<script language="javascript">
function doSomething()
{
var si = document.order.products.selectedIndex;
var partNo = document.order.products.options[si].value;
var desc = document.order.products.options[si].text;
alert("you selected part number " + partNo + ", '" + desc + " ' ");
}
</script>
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
|