Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome, Guest. Please login or register.
Did you miss your activation email?

August 19, 2022, 06:12:27 AM

Login with username, password and session length
Members
  • Total Members: 3843
  • Latest: Tricky
Stats
  • Total Posts: 193479
  • Total Topics: 21088
  • Online today: 58
  • Online ever: 1035
  • (November 26, 2020, 04:45:12 AM)
Users Online
Users: 2
Guests: 52
Total: 54

Author Topic: javascript Drop Down link table  (Read 14549 times)

0 Members and 1 Guest are viewing this topic.

Offline G6Cad

  • Friends
  • *
  • Posts: 12643
    • FamiljeGodis
javascript Drop Down link table
« on: February 04, 2006, 10:38:51 AM »
For those who have lack of space in the sidebars.

Use this java/html code for a drop down link box that just take about no space at all :)
Add as many links to it as you want sor fast access to something within your own site, or to another site.

I use it at my hompage if anyone want to try it out


Code: [Select]
<Script language="JavaScript">
<!-- Script courtesy of http://www.web-source.net - Your Guide to Professional Web Site Design and Development
function goto(form) { var index=form.select.selectedIndex
if (form.select.options[index].value != "0") {
location=form.select.options[index].value;}}
//-->
</SCRIPT>
<FORM NAME="form1">
<SELECT NAME="select" ONCHANGE="goto(this.form)" SIZE="1">
<OPTION VALUE="">-------JUMP TO-------
<OPTION VALUE="http://www.bloczone.net">BlocZone
<OPTION VALUE="/forum/home">Home
<OPTION VALUE="URL GOES HERE">SITE
<OPTION VALUE="URL GOES HERE">SITE
<OPTION VALUE="URL GOES HERE">SITE
<OPTION VALUE="URL GOES HERE">SITE</SELECT>
</FORM>
« Last Edit: February 04, 2006, 08:04:55 PM by Rasyr »

Offline RoarinRow

  • Hero Member
  • *****
  • Posts: 1034
  • Ride my AV!
    • Avalanche Style
Re: java Drop Down link table
« Reply #1 on: February 04, 2006, 11:35:42 AM »
Cool, thanks for the info  ;)

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

crip

  • Guest
Re: java Drop Down link table
« Reply #2 on: February 04, 2006, 11:54:56 AM »
That's really helpful block snippet, thanks g6cad. :)

Later, crip

Offline G6Cad

  • Friends
  • *
  • Posts: 12643
    • FamiljeGodis
Re: java Drop Down link table
« Reply #3 on: February 04, 2006, 12:04:46 PM »
 :laugh:

Rasyr

  • Guest
Re: java Drop Down link table
« Reply #4 on: February 04, 2006, 08:04:35 PM »
I know this may sound a bit nitpicky, but what you have there is a javascript function, not java. The two are very different animals.

;D
I adjusted the thread title for you.

BTW - nicely done.... ;D

« Last Edit: February 04, 2006, 08:06:35 PM by Rasyr »

superQ

  • Guest
Re: javascript Drop Down link table
« Reply #5 on: February 04, 2006, 08:34:51 PM »
I was just going to ask about this this morning. ;)

Incredibly useful. Love it !!!!!!!!
« Last Edit: February 04, 2006, 09:46:07 PM by superQ »

Offline IchBin

  • Friends
  • *
  • Posts: 16231
Re: javascript Drop Down link table
« Reply #6 on: February 04, 2006, 09:12:10 PM »
Very cool g6! I like that idea, I just might have to use it in my upcoming site update, if I ever get to it... :)

rbh

  • Guest
Re: javascript Drop Down link table
« Reply #7 on: April 09, 2006, 11:12:22 PM »
what would you change to get the links to open in a new browser? i have tried various things but can't get them to work. ???

Offline G6Cad

  • Friends
  • *
  • Posts: 12643
    • FamiljeGodis
Re: javascript Drop Down link table
« Reply #8 on: April 10, 2006, 01:55:56 AM »
You just type in the URL after the <OPTION VALUE=     
Like this
Code: [Select]
<OPTION VALUE="http://www.bloczone.net">BlocZone

rbh

  • Guest
Re: javascript Drop Down link table
« Reply #9 on: April 10, 2006, 09:03:22 AM »
G6, what i want it to do is open the links in a new window rather then the link opening in the current window taking users away from my site.