Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] value of select
- From: borchers at tridem.de (Michael Borchers)
- Subject: [Javascript] value of select
- Date: Mon Apr 25 05:34:33 2005
why won't this work?
can't see the alert:(
must the script function be posted in front of the form?
i guess thatvar orders_status_id is defined wrong:/
<form action="..." method="post" name="orders" onSubmit="return orders_submit()">
<select name="orders_status_id">
<option value="">1</option>
<option value="1">2</option>
</select>
</form>
function orders_submit()
{
var orders_status_id = document.orders.orders_status_id.options[document.orders.orders_status_id.selectedIndex].value;
if (orders_status_id == "1")
{
alert('test');
}
}
</script>
- Follow-Ups:
- [Javascript] value of select
- From: Shawn Milo
- [Javascript] value of select
- Prev by Date: [Javascript] custom extension of Array object
- Next by Date: [Javascript] value of select
- Previous by thread: [Javascript] User JavaScript in Opera 8
- Next by thread: [Javascript] value of select
- Index(es):