Help out poor zDooom with html 8(

Your computer is making weird noises? The program is crashing every 5 minutes? Ask all your non-bittorrent related technical questions in here!

Moderators: MidnightDemon, DriftngAsh, Lucky-7, Moderators

Help out poor zDooom with html 8(

Postby zDooom » Mon Oct 23, 2006 8:45 am

sorry i'm not back for long, but everyone here is so smart so i was hoping you'd help.

i've got an option bar, i want it to have a submit button that links, so i was hoping someone could show me how and explain as well, the code i have is just the option atm
Code: Select all
<form>
<select name="pick a game">
<option value="ff.hmt">Final fantasy</option>
<option value="halo.htm">Halo</option>
<option value="ssbm.htm">Super Smash Brothers</option>
</select>
</form>
i know i need an input button, and i think i need to put an action on the form, but other than that i'm lost >.<
User avatar
zDooom
Supreme Lurker
 
Posts: 827
Joined: Fri Feb 25, 2005 8:09 am

Postby frumplstlskn » Mon Oct 23, 2006 10:28 pm

Use javascript. :(
I've never gotten into html forms, can't help ya buddy. This site can though.

http://www.w3schools.com/html/html_forms.asp
User avatar
frumplstlskn
Prince of Spam
 
Posts: 6550
Joined: Mon Jul 18, 2005 3:09 pm
Location: Vancouver B.C.

Postby lambchopsil » Tue Oct 24, 2006 3:35 pm

Yes, you'll need JavaScript:
Code: Select all
<script>
function jump_to_link(weblist) {
  url_number=weblist.selectedIndex;
  location=weblist.options[url_number].value;
}
</script>

Put that code in your head section of your html

Code: Select all
<form>
<select name="pick_a_game" onchange="jump_to_link(this)">
<option value="ff.htm">Final Fantasy
<option value="halo.htm">Halo
<option value="ssbm.htm">Super Smash Brothers
</select>
</form>

Also note that you don't need
Code: Select all
</option>
and that your "ff.hmt" should probably be "ff.htm"

Names usually shouldn't have spaces, so change it to "pick_a_game"

(I hope I did that right and didn't forget something...)
User avatar
lambchopsil
Moderator
 
Posts: 137
Joined: Wed Jul 26, 2006 6:09 pm

Postby zDooom » Wed Oct 25, 2006 7:41 am

thanks, and the hmt was a typo >.>;;
and if i want new window, where would i put the
Code: Select all
 taget="_blank"
? and, if you could help me out and explain what the script tags where so i can understand how to do it on my own
User avatar
zDooom
Supreme Lurker
 
Posts: 827
Joined: Fri Feb 25, 2005 8:09 am

Postby lambchopsil » Wed Oct 25, 2006 3:26 pm

It's "target" not "taget"

As for scripts, you might as well look at the site frumplstlskn posted.
User avatar
lambchopsil
Moderator
 
Posts: 137
Joined: Wed Jul 26, 2006 6:09 pm

Postby zDooom » Wed Oct 25, 2006 5:33 pm

that was another typo >.<
User avatar
zDooom
Supreme Lurker
 
Posts: 827
Joined: Fri Feb 25, 2005 8:09 am


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 0 guests