Testing part of a form. So, right now I just want to alert what the user selects:
JS:
function getData(title)
{
alert(title);
}
HTML generated by PHP:
<select name="currentList" onChange="getData(this);">
<option value="hat">Hat</option>
<option value="shirt">Shirt</option>
<option value="pants">Pants</option>
</select>
when I change the value I get an alert with:
[object HTMLSelectElement]
try alert(this.value)