KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a question about form submit & onchange events not working together. When I change the value on the dropdown list the event viewroom() is not firing. Could anyone help me with this? The code is as follows <script type="text/javascript"> function viewroom() { alert(123); } </script> <form id="myform" name="myform" action="joinroom.php" method="post"> <select name="viewroom" id="viewroom" onChange="viewroom()"> <option value="1">Room1 </option> <option value="2">Room2 </option> </select> <input type="submit" onclick="this.form.submit()" value="Join room"><br> </form>
Tags (comma-separated)
Save Edits
Cancel