The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Drop down list with submit button, <form> with "submit" button
Sadiq
post Feb 24 2017, 01:42 AM
Post #1





Group: Members
Posts: 2
Joined: 24-February 17
Member No.: 26,327



Hi there,
I was looking for a drop down list with a "submit" button. After selecting when you submit, it will execute. So far I was able to make the drop down list WITHOUT submit button. It executes immediately as you select. Can anyone integrate "submit" button to it?
CODE

<form name="departments">
<div align="center">
<select name="departments" id="departments">
                <option value="departments" selected disabled>Select Your Department</option>
           <option value="mysite.com/AEE">Department of Aerospace Engineering</option>
            <option value="mysite.com/ARCH">Department of Architecture</option>
</select>
</div>
<script type="text/javascript">
var urlmenu = document.getElementById( 'departments' );
urlmenu.onchange = function() {
      window.open(  this.options[ this.selectedIndex ].value );
};
</script>
</form>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th April 2024 - 07:33 AM