codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Re: simple linking to exteranal site using dropdown and button example needed for newbie  Archive Import (david) at 12:43 on Thursday, July 03, 2003
 

Try this:

<select onchange="javascript:location.href=this.options[this.selectedIndex].value; return false;">
<option value=''>
Please Select a site</option>

<option value=`http://www.yahoo.com`>Yahoo</option>
<option value=`http://www.msn.com`>Msn</option>
</select>


David



  Re: simple linking to exteranal site using dropdown and button example needed for newbie  Archive Import (DaMoe) at 19:08 on Saturday, July 05, 2003
 

The above code is good, but this one is a great one too.

<Script Language="JavaScript">
<!-- Hide the script from old browsers --
function goto(form) { var index=form.select.selectedIndex
if (form.select.options[index].value != "0") {
location=form.select.options[index].value;}}//--> </SCRIPT>
<FORM NAME="form1">
<SELECT NAME="select" ONCHANGE="goto(this.form)" SIZE="1">
<OPTION>Your Menu Title
<OPTION VALUE="/index.html">CodeToad
<OPTION VALUE="/demos/shopping_cart/index.html">CodeToad Shopping Cart
<OPTION VALUE="www.codetoad.com/demos/blog">CodeTOad Blog</SELECT>
</FORM>

Add as many option values you need!!!

DaMoe


Edited by Forum Admin at 05:47 on Sunday, July 06, 2003
Reason:
links changed - sorry!]









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: C++ Beginner question
•  Re: function within loop problem
•  moncler outlet
•  Re: Display swf file in pdf
•  Re: how to create forum using asp.net with c# language?
•  Discount coach store
•  Create Better Maps with Global Mapper
•  Re: How to display a message box when record is temporary stored in session/grid view
•  Sharing object in perl


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2012