![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
|
DropDown Box .
Hi ,
Please How can i make links in a drop down box , as an example : i have the entries "1,2,3" so i want when i click on 1 it goes to a page and 2 to anther page etc .. please any one help me |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
|
http://www.google.com/search?hl=en&q...=Google+Search
[html] <form name="numz"> <select name="menu" onChange="location=document.numz.menu.options[document.numz.menu.selectedIndex].value;"> <option value="http://google.com">google</option> <option value="http://yahoo.com">yahoo</option> <option value="http://programmingforums.org">pfo</option> </select> </form> [/html] //edit, didnt really read your post, fixed it to link
__________________
Hoes telling me to calm down but I'm like fuck that shit!
|
|
|
|
|
|
#3 |
|
Programmer
|
oooh , so the value can be a link to anther site , i didnt know that i thought its a only a value of the variable in the option command
|
|
|
|
|
|
#4 | |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
Quote:
onChange="location=document.numz.menu.options[document.numz.menu.selectedIndex].value;" |
|
|
|
|
|
|
#5 |
|
Programmer
|
ok so how can i make the same example but with a popup window
|
|
|
|
|
|
#6 |
|
Programming Guru
![]() |
Change the "location = " to a function call to "popup".
This is an adaptation of DaWei's popup function. function popup(wURL,w,h,wID)
{
var specs = "width="+w+",height="+h+",top=10,left=10," +
"screenx=10,screeny=10," +
"resizable=yes,scrollbars=no,statusbar=no";
popWin = open(wURL, wID, specs);
popWin.focus ();
return popWin;
}And in that function call, the first paramter will be "document.numz.menu.options[document.numz.menu.selectedIndex].value", the second and third is the width/height of the popup, and the fourth is a unique identifier to make multiple popups in the same/different popup window. If you're familiar with javascript, it should be quite easy to set up. If you're not, post back and I can give a little more information on how abouts to do it. But don't give up right away just because I said that . . . |
|
|
|
|
|
#7 |
|
Programmer
|
thanks sane ,
really iam not good in javascript but i think that i got it , any way i'll post here if i needed any other help |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| dropdown menu with persistence? | kerriganm | HTML / XHTML / CSS | 11 | Dec 17th, 2005 2:33 PM |
| Java Disable Dropdown List | Ghost | Java | 2 | Nov 10th, 2005 8:34 PM |