Thread: Drop Down Menus
Results 1 to 7 of 7
Related
-
help with two drop down menus Forum: Javascript Forum
Replies: 3 -
two drop down menus Forum: Website Scripts Forum
Replies: 10 -
Drop Down Menus Forum: HTML Forum
Replies: 1 -
Drop down menus Forum: HTML Forum
Replies: 0 -
drop down menus Forum: HTML Forum
Replies: 2
-
08-03-2002, 08:04 AM #1
Drop Down Menus
Hi,
Is there a way to have the Drop Down Menu open a NEW window for the choice?
Thanks,
Ed....
-
08-03-2002, 08:21 AM #2
Hello there.
We can integrate the popup menu generator code with the drop down menu maker with a little JavaScript Knowledge.
First, choose what type of window you want to open using the popup window generator. This will give you a chunk of code to put in the head of your document. Copy this in. Here is an example -
Code:<SCRIPT LANGUAGE="JavaScript"> <!-- Thanks to Nic Wolfe http://fineline.xs.mw --> <!-- Begin function popup(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=500,height=400,left = 150,top = 100');"); } // End --> </script>
Code:onClick="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;"
Code:onClick="popup(document.jump.menu.options[document.jump.menu.selectedIndex].value);"
Hope that helps.If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
-
08-03-2002, 01:07 PM #3
Dean,
How would it look if I use a graphic rather then the "GO" button?
Ed....
-
08-03-2002, 02:34 PM #4
Change the 'function' section of the code given to you by the drop down menu maker to look like this and it will work fine -
Code:<script> function jumpMenu(){ badger=document.jump.menu.options[document.jump.menu.selectedIndex].value; day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(badger, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=300,height=300,left = 250,top = 150');"); } </script>
If one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
-
08-04-2002, 07:00 AM #5
Thanks, I'll give it a try. What does the expression "badger" mean?
-
08-04-2002, 09:45 AM #6
lol.
That part of the function is defining a variable. The name of the variable can be anything, most people would call it newwindow or popup or something, but it can be anything you feel like.Once the name is set you use that name to access the variable later on. If I cannot be bothered thinking of something, it always gets called badger
so its not an important javascript word or anythingIf one of our members helps you, please click theicon to add to their reputation!
No support via email or private message - use the forums!
Before you ask, have you Searched?
-
08-05-2002, 05:16 AM #7
As you can tell, I hadn't read over the entire script.