Click to See Complete Forum and Search --> : drop-down nav menu problem
Tek N9ne
02-11-2003, 03:58 PM
Hello all, I was wondering if one of you people full of JS wisdom could give me a hand with something... I am using JS drop down navigation menus on one of my new pages, but I need to figure out how to make the links in the menu target, everything that I have tried so far does not work.
If you go to www.420crew.com/customcreations then click on the link at the bottom of the page that leads to Body Kits, you will see where I have implemented these nav menus. Because of the fact that I am using Iframes on the site, I need to have the nav menus all target to "main" which i have named the middle content frame.
Currently when you try and follow one of the links it loads that page over the index page, whereas I want it to load in the main frame like the rest of the page.
If someone could fiddle with the code and tell me how to make it work the way I want it to that would be outstanding!
Thanks for all of your time in advance! Ill check back in a day or so to see if someone as come up with an answer, thanks again!
Charles
02-11-2003, 04:07 PM
<form action="url.pl" name="acura" target="main">
<select size="1" class="shared" name="quickbar" width="100" style="font-family: Arial, Helvetica, sans-serif; font-size: 9pt; color: #ffffff; font-weight: bold; background: #C80000;">
<option value="#" selected>Select An Acura</option>
<option>=========</option>
<option value="9093integra.htm">90-93 Integra</option>
<option value="9400integra.htm">94-00 Integra</option>
<option value="9296legend.htm">92-96 Legend</option>
<option value="01rsx.htm">2001 RSX</option>
<option value="9001nsx.htm">90-01 NSX</option>
<option value="acurajap.htm">Jap Conversions</option>
</select>
</form>
And then get something like the following up and running on your server:
#!usl/local/bin/perl
use CGI qw(redirect param)
print redirect 'http://www.420crew.com/customcreations/'.param('quickbar');
The method you are using relies upon JavaScript and will, therefore, fail one in ten times.
Tek N9ne
02-12-2003, 07:02 PM
That.... did... not.... work....
Nice try though.
There has to be a way to edit the js source code at the top of the page alone to be able to make it load in the main window... here is a copy of that:
<script language="JavaScript">
<!--
function QbDcTEST(s)
{ var d = s.options[s.selectedIndex].value;
window.top.location.href = d;
s.selectedIndex=0;
}
//-->
</script>
Is there somewhere in that code that you can specify to have all links target to one frame? Or something of that nature, I wouldnt mind another idea like the one that I got above, but maybe one that WORKS. LoL.
It always helps when you dont have typos in source code that actually makes a difference in the way something acts... IE usr/ not usl/... ahem.
Anyone have any more ideas for me?
Thanks
I forget how the code goes, but it's something like... window.parent.frames[0].location. Like I said, I forget how it goes, I don't normally work with frames very often...
AdamBrill
02-12-2003, 07:34 PM
Originally posted by Tek N9ne
That.... did... not.... work....
Nice try though.
How about being a little bit nicer???
Originally posted by Tek N9ne
Is there somewhere in that code that you can specify to have all links target to one frame? Or something of that nature, I wouldnt mind another idea like the one that I got above, but maybe one that WORKS. LoL.
It always helps when you dont have typos in source code that actually makes a difference in the way something acts... IE usr/ not usl/... ahem.
If your the one that needs help, why don't you at least appreciate the help that someone tries to gives you? Everyone makes a typo every once in a while... :)
Charles
02-12-2003, 08:00 PM
Sorry about that. You'll need to add a submit button to the form. And why would you insist on a JavaScript method knowing that it will fail as often as it will?