Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1">
- <table>
- <tr valign="baseline">
- <td nowrap="nowrap" align="right">Price:</td>
- <td><label>
- <select name="price" id="price">
- <option value="price1">price1</option>
- <option value="price2">price2</option>
- </select>
- </label></td>
- </tr>
- <tr valign="baseline">
- <td nowrap="nowrap" align="right">Course:</td>
- <td><label>
- <select name="course" id="course">
- <option value="course1">course1</option>
- <option value="course2">course2</option>
- </select>
- </label></td>
- </tr>
- </table>
- </form>
- var pr = document.getElementById("price");
- var co = document.getElementById("course");
- pr.onchange = function() {
- if(this.value == "price1")
- {
- co.selectedIndex = 0;
- }
- if(this.value == "price2")
- {
- co.selectedIndex = 1;
- }
- }
- co.onchange = function() {
- if(this.value == "course1")
- {
- pr.selectedIndex = 0;
- }
- if(this.value == "course2")
- {
- pr.selectedIndex = 1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement