View Single Post
  #1 (permalink)  
Old 01-06-2007, 09:00 AM
TcM's Avatar   
TcM TcM is offline
Moderator
 
Join Date: Aug 2006
Location: In a technologic world :p
Posts: 7,379
Credits: 0
Rep Power: 67
TcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud ofTcM has much to be proud of
Default Javascript: Navigate from a Drop down menu

Introduction:-
Here I will show you how to go to different websites from a drop down menu

Let's Begin:-
Make this code between the HEAD tags:-

Code:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function GotoURL(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}
// End -->
</SCRIPT>
and make this between the BODY tags:-

Code:
<form name="form">
<select name="site" size=1>
<option value="">Select where you want to go
<option value="http://www.time4videos.net.tc">Time4Videos
<option value="http://www.codecall.net">CodeCall
</select>
<input type=button value="Go there" onClick="javascript:GotoURL(this)">
</form>
Explanation:-
Code:
.......
<option value="">Select where you want to go
<option value="http://www.time4videos.net.tc">Time4Videos
<option value="http://www.codecall.net">CodeCall
.......
Include all the URL's here!

Conclusion:-
Code is attached, and feedback is welcome!
Attached Files To view attachments your post count must be 1 or greater. Your post count is 0 momentarily.

Last edited by TcM; 01-06-2007 at 09:02 AM.
Reply With Quote

Sponsored Links