xProteuSx Posted November 4, 2011 Share Posted November 4, 2011 I am trying to write a little JavaScript scriptlet, but I need to get this to work in order to figure out what's working and what's not: <select name="category" onChange.alert("yay") > <option></option> <option value="1">1</option> <option value="2">2</option> </select> Obviously I would like an alert popup that says 'yay' if the user makes a selection from the dropdown ... thanks. Link to comment https://forums.phpfreaks.com/topic/250421-onchange-alert/ Share on other sites More sharing options...
xProteuSx Posted November 4, 2011 Author Share Posted November 4, 2011 I thought this would work, but it didn't: <select name="category" onChange="alert("yay");" > <option></option> <option value="1">1</option> <option value="2">2</option> </select> Link to comment https://forums.phpfreaks.com/topic/250421-onchange-alert/#findComment-1284837 Share on other sites More sharing options...
xProteuSx Posted November 4, 2011 Author Share Posted November 4, 2011 ... got it to work. It was being echo'd using PHP so I had to escape the " marks. Cheers. Link to comment https://forums.phpfreaks.com/topic/250421-onchange-alert/#findComment-1284839 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.