![]() |
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 |
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 |
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
|
Quote:
:
onChange="location=document.numz.menu.options[document.numz.menu.selectedIndex].value;" |
ok so how can i make the same example but with a popup window
|
Change the "location = " to a function call to "popup".
This is an adaptation of DaWei's popup function. :
function popup(wURL,w,h,wID)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 . . . |
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 |
| All times are GMT -5. The time now is 12:46 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC