1. Welcome! Please take a few seconds to create your free account to post threads, make some friends, remove a few ads while surfing and much more. ClutchFans has been bringing fans together to talk Houston Sports since 1996. Join us!

Little HTML Help

Discussion in 'BBS Hangout' started by DREAMer, Nov 13, 2000.

  1. DREAMer

    DREAMer Member

    Joined:
    Feb 15, 1999
    Messages:
    2,173
    Likes Received:
    2
    I'm trying to put a "pull down" menu on my pages.

    Anyone have some good sites that give detailed instructions and/or steps on how to do it?

    I've sorta started by viewing code from pull down menus on different web sites. But, I'm not sure how to target the selection to the pages that I want.

    ------------------
    "I have a DREAM.........his name's Hakeem."
    DREAMer's Rocket Page
     
  2. Achebe

    Achebe Member

    Joined:
    Oct 26, 1999
    Messages:
    6,237
    Likes Received:
    3
    Hey DREAMer, here's an example:

    <font face="Verdana" size="1">
    Which NBA team lost to the Lakers tonight?
    <select id="teams">
    <option value="S">Suns</option>
    <option value="J">Jazz</option>
    <option selected value="R">Rockets</option>
    <option value="S">Sonics</option>
    <option value="W">Wolves</option>
    </select>

    </font>

    Just click to edit my post, and you'll of course, be able to read the src. Note the use of the word 'selected' in the option tag.

    I'm not quite sure what you mean by 'target the sel', but in your form or whatever, when you ask for the parameter 'teams', asp's request or a servlet's javax.servlet.http.HttpServletRequest object will return the value 'R', since I specified that as my value for 'Rockets'.

    ------------------
    "Everyone I know has a big but...

    come on Simone, let's talk about your but."
     
  3. DREAMer

    DREAMer Member

    Joined:
    Feb 15, 1999
    Messages:
    2,173
    Likes Received:
    2
    I meant, I want a pull down menu like at the bottom right of this page.

    One that someone can select a page, then hit "GO" to take them to that page.

    ------------------
    "I have a DREAM.........his name's Hakeem."
    DREAMer's Rocket Page
     
  4. stringthing

    stringthing Member

    Joined:
    Jul 18, 2000
    Messages:
    171
    Likes Received:
    0
    try this....

    <a href="http://www.designedmedia.com/gomenu.html">go here</a>.

    Copy the code and modify as you need.

    Hope this helps

    [This message has been edited by stringthing (edited November 13, 2000).]
     
  5. Achebe

    Achebe Member

    Joined:
    Oct 26, 1999
    Messages:
    6,237
    Likes Received:
    3
    ohhh... there are a couple of ways of doing that... either use a form, or merely an onChange event (or onClick, etc.) to fire off the "a href" value = the selected option of the combo box. Gee that's grammatically incorrect, but I think it makes sense. [​IMG]

    ------------------
    "Everyone I know has a big but...

    come on Simone, let's talk about your but."
     
  6. DREAMer

    DREAMer Member

    Joined:
    Feb 15, 1999
    Messages:
    2,173
    Likes Received:
    2
    I don't even really know how to do HTML.

    I've simply done my pages by copying and modifying.

    Javascript looks like its in Heiroglyphics to me. I got no idea how to modify it.

    I was recently trying to add a "mouse over" to a new menu I was going to add, but it got so confusing I had to scrap the whole idea.

    Is there no easier way.... or simpler way?

    ------------------
    "I have a DREAM.........his name's Hakeem."
    DREAMer's Rocket Page
     
  7. FrancisFan

    FrancisFan Member

    Joined:
    Jul 22, 2000
    Messages:
    1,166
    Likes Received:
    32
  8. FrancisFan

    FrancisFan Member

    Joined:
    Jul 22, 2000
    Messages:
    1,166
    Likes Received:
    32
    Dreamer to do the automatic pull-down here's the code, just modify the URL and description.

    <form method="POST">


    <textarea name="S1" rows="10" cols="50">&lt;SCRIPT LANGUAGE=&quot;JavaScript&quot;&gt;


    &lt;!-- Begin
    function formHandler(form){
    var URL = document.form.site.options[document.form.site.selectedIndex].value;
    window.location.href = URL;
    }
    // End --&gt;
    &lt;/SCRIPT&gt;&lt;!--webbot bot=&quot;HTMLMarkup&quot;
    endspan --&gt;&lt;!--webbot bot=&quot;HTMLMarkup&quot; startspan --&gt;&lt;center&gt;
    &lt;form name=&quot;form&quot;&gt;
    &lt;select name=&quot;site&quot; size=1 onChange=&quot;javascript:formHandler()&quot;&gt;
    &lt;option value=&quot;&quot;&gt;Go to....
    &lt;option value=&quot;andersonphotos_01.htm&quot;&gt;Shandon Anderson
    &lt;option value=&quot;bullardphotos.htm&quot;&gt;Matt Bullard
    &lt;option value=&quot;catophotos.htm&quot;&gt;Kelvin Cato
    &lt;option value=&quot;collierphotos.htm&quot;&gt;Jason Collier
    &lt;option value=&quot;drewphotos.htm&quot;&gt;Bryce Drew
    &lt;option value=&quot;francisphotos_01.htm&quot;&gt;Steve Francis
    &lt;option value=&quot;&quot;&gt;Devin Gray (None)
    &lt;option value=&quot;langhiphotos.htm&quot;&gt;Dan Langhi
    &lt;option value=&quot;millerphotos.htm&quot;&gt;Anthony &quot;Pig&quot; Miller
    &lt;option value=&quot;mobleyphotos_01.htm&quot;&gt;Cuttino Mobley
    &lt;option value=&quot;norrisphotos.htm&quot;&gt;Moochie Norris
    &lt;option value=&quot;&quot;&gt;Hakeem Olajuwon (None)
    &lt;option value=&quot;rogersphotos.htm&quot;&gt;Carlos Rogers
    &lt;option value=&quot;thomasphotos.htm&quot;&gt;Kenny Thomas
    &lt;option value=&quot;rudyphotos.htm&quot;&gt;Rudy Tomjanovich
    &lt;option value=&quot;williamsphotos.htm&quot;&gt;Walt Williams
    &lt;option value=&quot;RMRPhotos1_01.htm&quot;&gt;1999 Rocky Mnt Revue
    &lt;option value=&quot;RMRPhotos2_01.htm&quot;&gt;2000 Rocky Mnt Revue
    &lt;/select&gt;
    &lt;/form&gt;</textarea></p>

    ------------------
    Cuttino Mobley Online
    vote.cuttino-mobley.com Cuttino and Steve for 2001 All-Star Team
     
  9. FrancisFan

    FrancisFan Member

    Joined:
    Jul 22, 2000
    Messages:
    1,166
    Likes Received:
    32
    Here's the go button code.

    <form method="POST">


    <textarea name="S1" rows="10" cols="50">&lt;FORM NAME=&quot;stats&quot;&gt;
    &lt;SELECT NAME=&quot;B&quot;&gt;
    &lt;OPTION VALUE = &quot;stats/averages.htm&quot;&gt;Averages
    &lt;OPTION VALUE = &quot;stats/totals.htm&quot;&gt;Totals
    &lt;/SELECT&gt;
    &lt;INPUT TYPE=&quot;button&quot; VALUE=&quot;Go!&quot; onclick=&quot;location.href = this.form.B.options[this.form.B.selectedIndex].value&quot;&gt;&lt;/FORM&gt;
    &lt;noscript&gt;&lt;ul&gt;&lt;li&gt;&lt;A HREF=&quot;1999.htm&quot;&gt;1999&lt;/a&gt;&lt;br&gt;&lt;/ul&gt;&lt;/noscript&gt;</textarea></p>
    </form>

    ------------------
    Cuttino Mobley Online
    vote.cuttino-mobley.com Cuttino and Steve for 2001 All-Star Team
     
  10. BobFinn*

    BobFinn* Member

    Joined:
    Feb 10, 2000
    Messages:
    11,438
    Likes Received:
    6
  11. DREAMer

    DREAMer Member

    Joined:
    Feb 15, 1999
    Messages:
    2,173
    Likes Received:
    2
    Hey guys thanks for all the help.

    I have one on the page now, but it won't work.

    Can someone take a look and see what my problem is?

    The pulldown menu is near the bottom of the page.

    The link's in my sig...

    ------------------
    "I have a DREAM.........his name's Hakeem."
    DREAMer's Rocket Page
     
  12. FrancisFan

    FrancisFan Member

    Joined:
    Jul 22, 2000
    Messages:
    1,166
    Likes Received:
    32
    Dreamer Here's template just add more options:


    &lt;FORM NAME=&quot;form1&quot;&gt;

    &lt;SELECT NAME=&quot;B&quot;&gt;

    &lt;OPTION VALUE = &quot;Home_Page/Home.html&quot;&gt;Our Home
    Page

    &lt;OPTION VALUE = &quot;stats/2000GBG.htm&quot;&gt;2000

    &lt;OPTION VALUE = &quot;stats/1999GBG.htm&quot;&gt;1999

    &lt;/SELECT&gt;

    &lt;INPUT TYPE=&quot;button&quot; VALUE=&quot;Go!&quot;
    onclick=&quot;location.href =
    this.form.B.options[this.form.B.selectedIndex].value&quot;&gt;&lt;/FORM&gt;



    ------------------
    Cuttino Mobley Online
    vote.cuttino-mobley.com Cuttino and Steve for 2001 All-Star Team

    [This message has been edited by FrancisFan (edited November 13, 2000).]
     
  13. FrancisFan

    FrancisFan Member

    Joined:
    Jul 22, 2000
    Messages:
    1,166
    Likes Received:
    32
  14. DREAMer

    DREAMer Member

    Joined:
    Feb 15, 1999
    Messages:
    2,173
    Likes Received:
    2
    Okay, you know how on this page (below) Clutch has numbers in the quotes as his "option values"? like:

    { OPTION value="">Category: Rocket Classifieds
    { OPTION VALUE="">--------------------
    { OPTION value="4">Videos and Memorabilia
    { OPTION value="6">Tickets
    { OPTION value="">

    Obviously, "Category: Rocket Classifieds" is just a heading, but what do the numbers "4" and "6" signify?

    I've got a couple of examples up on my page, but they're still not working. Dammit, I hate not knowing how to do something. [​IMG]

    ------------------
    "I have a DREAM.........his name's Hakeem."
    DREAMer's Rocket Page


    [This message has been edited by DREAMer (edited November 13, 2000).]
     
  15. FrancisFan

    FrancisFan Member

    Joined:
    Jul 22, 2000
    Messages:
    1,166
    Likes Received:
    32
  16. DREAMer

    DREAMer Member

    Joined:
    Feb 15, 1999
    Messages:
    2,173
    Likes Received:
    2
    Francis Fan,

    Okay, I put up the menu exactly like you have it, but it still won't work.

    I keep getting an error message saying that an error has occured in the script.

    Please, someone take a look and tell me where I'm screwing up.


    ------------------
    "I have a DREAM.........his name's Hakeem."
    DREAMer's Rocket Page
     
  17. Dr of Dunk

    Dr of Dunk Clutch Crew

    Joined:
    Aug 27, 1999
    Messages:
    46,633
    Likes Received:
    33,635
    The VALUE is what is actually going to be returned to whatever is being activated by pressing the "GO" button or whatever button you press after making your selection. For example, when I select the following :

    OPTION value="4">Videos and Memorabilia

    and press the "OK" or whatever button, the value of "4" is passed onto the code that receives the results of that button press. If I pass on the value of "4", I can have code that says (in pseudo-code)

    If 4, Then Load "Videos and Memorabilia" forum

    You're just assigning the value of "4" to that particular selection and then triggering other code based on the value passed. If you look at the code you posted again, you'll see lines like :

    OPTION value="">Category: Rocket Classifieds
    OPTION VALUE="">--------------------

    Notice the value being passed is what's called an empty string or "". Clutch probably has code in the background that says,

    If "" Then TheyDidn'tSelectAValidForum.

    The code then displays something that says, "Hey dork, you didn't select a forum".

    Try selecting one of the forums and pressing the "GO" button. Once you get to the forum, look at the "Address" or "Location" field in your browser -- where you type your URL's to run around the Internet. You'll see the number that was passed as part of the URL.
    http://bbs.clutchcity.net/ubb-cgi/forumdisplay.cgi?action=topics&number=4&SUBMIT=Go

    I selected "Videos and Memorabilias" and you can see th "4" that was passed as a variable/parameter to the CGI code.



    ------------------

    A friend of mine graduated from law school in May, and he's had a heck of a time finding work....He might be a moron, though. (I don't think he is, but one never knows. He was a moron when we were five years-old.) -- mrpaige reflects on his friends
     
  18. Dr of Dunk

    Dr of Dunk Clutch Crew

    Joined:
    Aug 27, 1999
    Messages:
    46,633
    Likes Received:
    33,635
    Dreamer,

    <html>
    <body>

    <form method="POST">



    <select size="1" name="D1">
    <option value="http://members.nbci.com/DREAMer88/Home_Page/Home.html" selected>Our
    Home Page</option>
    <option value="http://members.nbci.com/DREAMer88/Wedding/Wedding.html">Our
    Wedding</option>
    <option value="http://members.nbci.com/DREAMer88/Mexico_Trip/Mexico.html">Mexico
    Trip</option>
    <option value="http://members.nbci.com/DREAMer88/Jethro_Tull/Tull.html">Jethro
    Tull</option>
    <option value="http://members.aol.com/abbott42/friendsandus.html">Friends
    and Us</option>
    </select><input type="BUTTON" value="GO!" name="B1" onClick ="location.href = D1.value"></p>
    </form>

    </body>

    </html>

    Let me know if you want me to send you the code.

    [This message has been edited by Dr of Dunk (edited November 14, 2000).]
     
  19. DREAMer

    DREAMer Member

    Joined:
    Feb 15, 1999
    Messages:
    2,173
    Likes Received:
    2
    DoD,

    I went ahead and put that code on my page, and it works. I still don't know why that one works but the one I had on before didn't.... oh well, as long as it works that's all that matters.

    I really appreciate the help.

    I created all my web pages from just trial and error, but this javascript, cgi, flash, etc. are way to complicated for me to even try to delve into. Especially with school busting my hump.

    How about an opinion question.

    1.) Should I leave up the table with the clickable buttons to my pages? (And, therefore have no need for the pulldown menu)

    2.) Use the pulldown menu and scrap the table?

    ------------------
    "I have a DREAM.........his name's Hakeem."
    DREAMer's Rocket Page
     
  20. DREAMer

    DREAMer Member

    Joined:
    Feb 15, 1999
    Messages:
    2,173
    Likes Received:
    2
    One more question:

    3.) Since I'm on NBCi.com they (of course) have their banner on my page. This is not a problem. The banner is actually fairly small and doesn't detract from my pages.

    The question is, how can I make sure that another NBCi.com menu bar doesn't pop up in the same window when someone uses the pulldown menu? (because it does)

    If this isn't possible, I guess I'll just have to stick with the old-fashioned table....

    ------------------
    "I have a DREAM.........his name's Hakeem."
    DREAMer's Rocket Page
     

Share This Page