+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Simple html drop down menus

  1. #1
    richm8026 is offline x10 Sophmore richm8026 is an unknown quantity at this point
    Join Date
    Feb 2008
    Posts
    138

    Simple html drop down menus

    I'm having some difficulties here, I want to create a simple drop down menu to save room on my, I know to use <option value="Free Sign Up"> But I want it to do go to this site: www. myleague. com/badattitudes/FreeSignUp, how would i make that Option Value load that link? Thanks in advance! ;)
    Last edited by tittat; 07-10-2009 at 11:11 AM.


  2. #2
    richm8026 is offline x10 Sophmore richm8026 is an unknown quantity at this point
    Join Date
    Feb 2008
    Posts
    138

    Re: Simple html drop down menus

    Sorry, I do not use Microsoft, so that stuff isn't handy for me..


  3. #3
    Chris S's Avatar
    Chris S is offline Retired Chris S is an unknown quantity at this point
    Join Date
    Mar 2005
    Posts
    1,036

    Re: Simple html drop down menus

    do you want it so that when they chose the drop down it redirects them to a new page, or do you want them to have to submit the form and it will redirect them to a new page.

    The first can be done in javascript and the second can be done in php or most any other programming language

    I would love to change the world, but they won't give me the source code

  4. #4
    richm8026 is offline x10 Sophmore richm8026 is an unknown quantity at this point
    Join Date
    Feb 2008
    Posts
    138

    Re: Simple html drop down menus

    Thanks, and yes, just redirect, it doesn't have to be anything fancy... So, I figured maybe JS would be the best way to go.


  5. #5
    Chris S's Avatar
    Chris S is offline Retired Chris S is an unknown quantity at this point
    Join Date
    Mar 2005
    Posts
    1,036

    Re: Simple html drop down menus

    Here is something that I found online...not sure how well it will work, but it is worth a shot

    Code:
    <script type="text/javascript">
    var selectmenu=document.getElementById("mymenu")
    selectmenu.onchange=function(){
     var chosenoption=this.options[this.selectedIndex]
     if (chosenoption.value!="nothing"){
      window.location = chosenoption.value
     }
    }
    </script>
    
    <form id="aform">
    <select id="mymenu" size="1">
    <option value="nothing" selected="selected">Select a site</option>
    <option value="http://www.dynamicdrive.com">Dynamic Drive</option>
    <option value="http://www.codingforums.com">Coding Forums</option>
    <option value="http://www.cssdrive.com">CSS Drive</option>
    </select>
    </form>
    that is worth a shot...i haven't tried it

    I would love to change the world, but they won't give me the source code

  6. #6
    sourfacedcyclop's Avatar
    sourfacedcyclop is offline x10 Sophmore sourfacedcyclop is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    221

    Re: Simple html drop down menus

    This works okay,

    Code:
    <form>
    <select>
    <option OnClick="window.location='yourlink'"> Blah Blah Blah</option>
    </select>
    </form>
    Last edited by sourfacedcyclop; 07-11-2009 at 10:32 PM.
    "Sanity is nothing but our interpretation of reality"

    http://tswebvisions.com - Portfolio

  7. #7
    richm8026 is offline x10 Sophmore richm8026 is an unknown quantity at this point
    Join Date
    Feb 2008
    Posts
    138

    Re: Simple html drop down menus

    Thanks, it makes sense, =-)
    Edit:
    It makes sense, but it doesn't work, it acts like it's missing some kind of operand.
    Last edited by richm8026; 07-11-2009 at 10:47 PM. Reason: Automerged Doublepost


  8. #8
    Chris S's Avatar
    Chris S is offline Retired Chris S is an unknown quantity at this point
    Join Date
    Mar 2005
    Posts
    1,036

    Re: Simple html drop down menus

    I would try the second one posted, if you want, I can look into fixing the version, but like I suggested, I would try the other one.

    I would love to change the world, but they won't give me the source code

  9. #9
    richm8026 is offline x10 Sophmore richm8026 is an unknown quantity at this point
    Join Date
    Feb 2008
    Posts
    138

    Re: Simple html drop down menus

    Thanks, I tried them both, they both didn't work, I wonder what's going on with them..


  10. #10
    sourfacedcyclop's Avatar
    sourfacedcyclop is offline x10 Sophmore sourfacedcyclop is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    221

    Re: Simple html drop down menus

    Did you use a valid link format for the links? Also, for my code, you need to make sure the ' ' are still in place at the beginining and end of the link.
    Last edited by sourfacedcyclop; 07-12-2009 at 06:23 PM.
    "Sanity is nothing but our interpretation of reality"

    http://tswebvisions.com - Portfolio

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. can't place the Banner Ad on a simple HTML page
    By darkangel1988 in forum Free Hosting
    Replies: 3
    Last Post: 05-23-2008, 12:48 PM
  2. drop down menus with JavaScript disabled?
    By sifaka in forum Free Hosting
    Replies: 1
    Last Post: 05-15-2008, 10:46 AM
  3. [req] simple html template
    By blaindugan in forum The Marketplace
    Replies: 14
    Last Post: 06-05-2006, 09:40 PM
  4. [IPB] Contiguous Board Index
    By phenetic in forum Tutorials
    Replies: 5
    Last Post: 09-18-2005, 10:31 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers