TeamPhotoshop
Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
Forum Home Latest Posts Search Help Subscribe

a CSS and javascript (i think) question

Page: 1 2 Reply
Mar 12th 2002#35480 Report
Member since: Mar 20th 2001
Posts: 319
I am trying (and i stress trying) to make a drop down menu. NOT the kind on the TPS front page, for example, but the kind that looks like this:

------

As for the JavaScript(?): When the selection is chosen, the link will automatically open in the same window.

And the CSS: How would I make them all small like that? I have tried changing the size and color in a seperate .css document, so i must be doing something wrong.

------

Now, I've seen these stupid things all over the 'net. As a matter of fact, there is one at the bottom of this very page. But no search engine has weilded any results for a tutorial. I am asking for some help with the actual code to make it jump automatically, and the CSS code to make it small and colored.

Many thanks go out to anyone who can help me!! ;)
Reply with Quote Reply
Mar 12th 2002#35485 Report
Member since: Mar 18th 2001
Posts: 1452
1)

option{background:#yourcolorhere; font-family:verdana,arial,helvetica; color:#yourcolorhere; font-size:XXpt; font-weight:XXX}

2)

Add this to your select statement:
onchange="window.location=('this.options[this.selectedIndex].value)"

I think.
Reply with Quote Reply
Mar 12th 2002#35501 Report
Member since: Mar 20th 2001
Posts: 319
OK, the CSS works :D :D :D :D :D , but the JavaScript (by the way, is it javascript?) doesn't work. You can look at the test page here if you want to look at my code. Thanks!
Reply with Quote Reply
Mar 12th 2002#35504 Report
Member since: Mar 18th 2001
Posts: 1452
Try this then (I forgot something):

<select name="menu" onchange="window.location=(form.menu.options[form.menu.selectedIndex].value)">
Reply with Quote Reply
Mar 12th 2002#35510 Report
Member since: Mar 20th 2001
Posts: 319
niiiiice. Thank you so much MBB!!! Many thanks go to you. :D
Reply with Quote Reply
Mar 12th 2002#35513 Report
Member since: Mar 18th 2001
Posts: 1452
No problem. Glad I could help.
Reply with Quote Reply
Mar 12th 2002#35516 Report
Member since: Mar 20th 2001
Posts: 319
Ok, this is utter crap. I now have tried to put the code into my layout (link), and it is really messed up. If you look at the code, you can see that I've put the code in three different ways, one for each menu. Please check it out and tell me what's wrong. Thanks.

btw, I do want 3 of them in there. ;)

The link again
Reply with Quote Reply
Mar 12th 2002#35518 Report
Member since: Mar 18th 2001
Posts: 1452
What's wrong? They all 3 work for me. :confused:
Reply with Quote Reply
Mar 13th 2002#35530 Report
Member since: Mar 20th 2001
Posts: 319
yes, but the are supposed to be aligned differently. They should look like this:

Reply with Quote Reply
Mar 13th 2002#35531 Report
Member since: Apr 7th 2001
Posts: 366
Broken Link
Reply with Quote Reply
Page: 1 2 Back to top
Please login or register above to post in this forum