Help with drop down menu's

Discussion in 'HTML & Website Design' started by sc0ttish, Jul 28, 2006.

  1. #1
    Hi everyone,

    I'm stuck, after spending the better part of 3 days trying to figure it out i'm giving up and asking for help.

    What i'm trying to do is to have a drop down menu which then updates the same page with new info depending on what link is selected from the menu.

    I know there will be a simple solution to this but i cant seem to figure it out.
    Does anyone know any websites that can explain it?

    Thanks in advance
     
    sc0ttish, Jul 28, 2006 IP
  2. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Do you mean without a submit button or do you just means Drop Down -> Choose one -> Hit Go -> New page loads with selected topic.

    Also, do you just do HTML or do you run PHP / other scripting languages as well?
     
    T0PS3O, Jul 28, 2006 IP
  3. sc0ttish

    sc0ttish Peon

    Messages:
    183
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi TOPS30

    Yeah without a submit button, just want the user to choose one from the menu and the page would then automatically reload.

    I've been trying it with PHP, dont think just html would do it

    I dont want to have a new page load, just want the current page to reload with new info depending on what is selected from the menu.

    I've seen it on a few sites in the past so i know its possible, just cant seem to work it out.
     
    sc0ttish, Jul 28, 2006 IP
  4. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You'll need JavaScript's onClick in combination with the <option>'s. If you trule don't want any reloads, you'll need AJAX. I'm no expert with that so I'll leave that to others.
     
    T0PS3O, Jul 28, 2006 IP
  5. AMysticWeb

    AMysticWeb Guest

    Messages:
    38
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Are you talking about an iFrame maybe?

    With this the new page (of your creation) would actually load into the frame, but wouldn't actually change the primary page structure and content.

    Of course some users can't view frames and others just either don't like them or turn them off.

    I think the iFrame is viewed a tad differently ( I know I am more tolerant of them than actual framed pages ).
     
    AMysticWeb, Jul 28, 2006 IP
  6. pierre

    pierre Active Member

    Messages:
    71
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    98
    #6
    I am afraid sc0ttish need Ajax...

    You can load several div's in page and then show one by one like
    http://www.aliroman.com/article/how-to-create-web-tabs-with-javascript-show-hide-layers-34-1.html

    There is no reload. For such a small layers like you can see on that example at http://www.flaxweb.com/projects/fanslogon2/index.php [ COLUMNS - FORUMS - BLOG ] it is ok.

    But if you need more content in them, if you maybe want whole central part of a page to change by switching those tabs, then you should consider Ajax.

    You shoud be very clever in that case. I gave up. Try java script libraries:
    http://script.aculo.us/
    http://prototype.conio.net/
     
    pierre, Jul 28, 2006 IP