jibo Posted April 3, 2006 Share Posted April 3, 2006 I want my links page to be a drop down menu with a submit box next to it to obviously to go to the site u select... im pretty new 2 html so not reli sure.. cant find any help anywhere i "borrowed" dis code from sum1s site n changed the option values to wot want (as an example) but they dont work... i assume its the "<input type=button..." part thats causing the problem but im not sure please can sum1 help me!!!!-----------------------------------------------------------------------------------------------<B>SELECT A CATEGORY!</B><BR><form name="navform" METHOD=post> <select name="inchoice" size=1><option value ="/index.html" selected>CLICK A LINK THEN "SUBMIT"<option value ="http://yabberchat.com/">yabber chat<option value ="/http://www.ask.com/">jeeves<option value ="http://www.yahoo.com/">yahoo<option value ="http://google.com/">google<option value ="http://lordruler.piczo.com">me site<option value ="http://altavista.com/">altavista<option value ="/http://hotmail.com">hotmail</select><input type=button onClick= "location = '' + document.navform.inchoice.options[ document.navform.inchoice.selectedIndex ].value;" value="SUBMIT">------------------------------------------------------------------Thanks JiBo!!! Link to comment Share on other sites More sharing options...
Little Goat Posted April 3, 2006 Share Posted April 3, 2006 ok, first with your code, put it in a codebox. I don't know how to display how to do it without doing it, so look at the announcement that shows up on all the pages.second, close your options:this is right<option>blabla</option>this is wrong<option>blablalast of all,the onclick should look like this:onClick="window.location=document.navform.inchoice.value"I recomend using the onmousedown property instead of onclick. I was told that netscape doesn't support onclick very well.LG Link to comment Share on other sites More sharing options...
pulpfiction Posted April 3, 2006 Share Posted April 3, 2006 This code seems to be working fine when I tried...<B>SELECT A CATEGORY!</B><BR><form name="navform" METHOD=post><select name="inchoice" size=1><option value ="/index.html" selected>CLICK A LINK THEN "SUBMIT"<option value ="http://yabberchat.com/">yabber chat<option value ="http://www.ask.com/">jeeves<option value ="http://www.yahoo.com/">yahoo<option value ="http://google.com/">google<option value ="http://lordruler.piczo.com">me site<option value ="http://altavista.com/">altavista<option value ="http://hotmail.com">hotmail</select><input type=button onClick= "location = '' + document.navform.inchoice.options[ document.navform.inchoice.selectedIndex ].value;" value="SUBMIT">In the bold part use two single quotes, (in case if you are using double quotes)I have also removed the slashes that was there ahead of "jeeves" and "hotmail" Link to comment Share on other sites More sharing options...
Little Goat Posted April 3, 2006 Share Posted April 3, 2006 one problem with pulpfictions code:close the option tags!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now