#1
  1. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Dec 2004
    Posts
    1
    Rep Power
    0

    Redirecting User Via Drop Down Box


    Ive created a drop down box, and I want it, dependant on what the user has selected, redirect them to webpage.

    How do I go about setting this up?
  2. #2
  3. Contributing User
    ASP Scholar (3000 - 3499 posts)

    Join Date
    Jun 2004
    Posts
    3,072
    Rep Power
    190
    Code:
    <html>
    <head>
    <title>Jump Menu Example</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script language="JavaScript">
    <!--
    function MM_jumpMenu(targ,selObj,restore){ //v3.0
      eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
      if (restore) selObj.selectedIndex=0;
    }
    
    function MM_findObj(n, d) { //v4.0
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && document.getElementById) x=document.getElementById(n); return x;
    }
    
    function MM_jumpMenuGo(selName,targ,restore){ //v3.0
      var selObj = MM_findObj(selName); if (selObj) MM_jumpMenu(targ,selObj,restore);
    }
    //-->
    </script>
    </head>
    
    <body bgcolor="#FFFFFF" text="#000000">
    <form name="form1">
      <select name="JumpMenu1" onChange="MM_jumpMenu('parent',this,0)">
    	<option value="page1.asp" selected>Page 1</option>
    	<option value="page2.asp">Page 2</option>
    	<option value="page3.asp">Page 3</option>
      </select>
      <input type="button" name="Button1" value="Go" onClick="MM_jumpMenuGo('JumpMenu1','parent',0)">
    </form>
    </body>
    </html>
    http://www.MapDays.com | Find events wherever, whenever you want them

Similar Threads

  1. Securing A Database
    By TBÁrpi in forum Microsoft Access Help
    Replies: 31
    Last Post: January 25th, 2005, 06:23 PM
  2. User Friendly form
    By dupati1 in forum HTML, JavaScript And CSS Help
    Replies: 0
    Last Post: October 31st, 2004, 09:33 AM
  3. SQL Query question...
    By LilMoke in forum SQL Development
    Replies: 3
    Last Post: June 16th, 2004, 10:23 AM
  4. redirecting the user after login
    By icepricessa in forum ASP Development
    Replies: 2
    Last Post: October 23rd, 2003, 10:24 AM

IMN logo majestic logo threadwatch logo seochat tools logo