faqts : Computers : Programming : Languages : JavaScript : Language Core : Objects

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

2 of 14 people (14%) answered Yes
Recently 2 of 10 people (20%) answered Yes

Entry

Using an onChange event, how do I get the name of the widget that invoked the event?

Dec 20th, 2001 09:45
Arsen Yeremin, Doug Vanderpool,


<html>
<head>
	<title>My Listbox</title>
</head>
<body>
<form name="my_form">
  <select name="my_select" onchange="alert(this.name)">
    <option value="a">a</option>
    <option value="b">b</option>    
    <option value="c">c</option>    
    <option value="d">d</option>
    <option value="e">e</option>        
  </select>
</form>
</body>
</html>