TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 19, 2024, 09:22:02 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,165
  • Total Topics: 21,219
  • Online today: 266
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 176
  • Total: 176

javascript Drop Down link table

Started by g6cad, February 04, 2006, 05:38:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

G6Cad

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


<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>

RoarinRow


SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

crip

That's really helpful block snippet, thanks g6cad. :)

Later, crip

G6Cad


Rasyr

#4
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


superQ

#5
I was just going to ask about this this morning. ;)

Incredibly useful. Love it !!!!!!!!

IchBin

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

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. ???

G6Cad

You just type in the URL after the <OPTION VALUE=     
Like this <OPTION VALUE="http://www.bloczone.net">BlocZone

rbh

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.