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. Quote Link to comment 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> Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.