Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 02-13-2003, 11:09 AM   #1 (permalink)
JoeyJoeJo
Registered User
 
Join Date: Feb 2003
Posts: 1
JoeyJoeJo is on a distinguished road
Send a message via AIM to JoeyJoeJo
Dropdown list in HTML

I can make the list okay, but I need to know how to make the items link to other sites when they are clicked. What I have now is something like

<select name="example">
<option>option1
<option>option2
<option>etc.
</select>

I want to make the options link to other pages on the site. How do I do that?

Thanks :rock:
JoeyJoeJo is offline   Reply With Quote
Old 02-13-2003, 03:51 PM   #2 (permalink)
Ilya020
Techno Rat
 
Ilya020's Avatar
 
Join Date: Jan 2003
Location: San Diego
Posts: 559
Ilya020 is on a distinguished road
Send a message via AIM to Ilya020
Dude...

http://justlinux.com/forum/showthrea...threadid=90246

Ilya
__________________
> SELECT * FROM users WHERE clue > 0
0 rows returned
Ilya020 is offline   Reply With Quote
Old 02-13-2003, 04:34 PM   #3 (permalink)
anon
Guest
 
Posts: n/a
Quote:
Originally posted by ilya020
Dude...

http://justlinux.com/forum/showthrea...threadid=90246

Ilya
Dude.....

http://www.justlinux.com/forum/showt...ight=PHP+array

Follow your own examples.
What you need is a JS event that runs in real time (check out my timers NUM) to check if a value has been chosen and if so make the window.location different as appropriate.
  Reply With Quote
Old 02-13-2003, 06:00 PM   #4 (permalink)
Ilya020
Techno Rat
 
Ilya020's Avatar
 
Join Date: Jan 2003
Location: San Diego
Posts: 559
Ilya020 is on a distinguished road
Send a message via AIM to Ilya020
Quote:
Originally posted by Vlad902


Dude.....

http://www.justlinux.com/forum/showt...ight=PHP+array

Follow your own examples.
What you need is a JS event that runs in real time (check out my timers NUM) to check if a value has been chosen and if so make the window.location different as appropriate.
huh?

Ilya
__________________
> SELECT * FROM users WHERE clue > 0
0 rows returned
Ilya020 is offline   Reply With Quote
Old 02-13-2003, 07:27 PM   #5 (permalink)
joe_bruin
LOAD "*",8,1
 
Join Date: Feb 2003
Location: la.ca.us
Posts: 254
joe_bruin is on a distinguished road
Quote:
Originally posted by Vlad902
What you need is a JS event that runs in real time (check out my timers NUM) to check if a value has been chosen and if so make the window.location different as appropriate.
using a timer to keep checking if something changed is known as 'polling'. polling is often bad. in this case it keeps the javascript interpreter running, for no real reason, after the page has been rendered (it could be 3 days until the user actually selects something). instead, javascript provides asynchronous events (in this case, OnChange) so that your browser doesn't have to consume processor time while waiting for something to happen.

here are a few great examples: http://www.tneoh.zoneit.com/javascript/listboxlink.html

yes, i am aware that the cpu time consumed in this instance is trivial, but it's bad practice anyway.
joe_bruin is offline   Reply With Quote
Old 02-13-2003, 11:06 PM   #6 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
joe is right.
__________________


Urban Clothing
Admin is offline   Reply With Quote
Old 02-14-2003, 09:57 AM   #7 (permalink)
anon
Guest
 
Posts: n/a
Yeah, I *just* remembered that you can specify that type of thing in the HTML tag so that it launches an event when clicked but I was busy and had no time to edit my post :/
  Reply With Quote
Old 02-14-2003, 09:58 AM   #8 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,530
sde is on a distinguished road
here's some code from a online learning system i built which does what i think you want to do.
PHP Code:
<form name="jump">
&
nbsp; <select name="menu" onChange="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="GO">
<
option value="courses.php?" selected>Make a Selection</option>
<
option value="courses.php?search_by=group_id&search_for=1">Hard Disk Recording</option>
<
option value="courses.php?search_by=group_id&search_for=5">Keyboards</option>
<
option value="courses.php?search_by=group_id&search_for=6">Samplers</option>
<
option value="courses.php?search_by=group_id&search_for=2">Digital Mixing</option>
<
option value="courses.php?search_by=group_id&search_for=3">Guitars</option>
<
option value="courses.php?search_by=group_id&search_for=4">Drums and Percussion</option>
</
select>&nbsp
</
form
sde is offline   Reply With Quote
Old 02-26-2003, 12:00 PM   #9 (permalink)
Kernel_Killer
Regular Contributor
 
Kernel_Killer's Avatar
 
Join Date: Feb 2003
Location: indisclosed
Posts: 210
Kernel_Killer is on a distinguished road
Or you could always jump into DHTML.
Kernel_Killer is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML form preview then INSERT using PHP & MySQL SteveSoler PHP 16 09-22-2008 12:59 AM
Code For Displaying files in List Box shash MS Technologies ( ASP, VB, C#, .NET ) 1 08-23-2004 10:53 PM
Help with launching an exy within HTML. Nicotine HTML, XML, Javascript, AJAX 5 05-12-2004 04:00 PM


All times are GMT -8. The time now is 12:24 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC8 ©2007, Crawlability, Inc.





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting