Alright, Im using a 3 part frame set up to display a download section. The top is the title with a Javascript menubar acrost the top (no problems with this). The left frame under the top frame is my menu. It has 5 pop-up menus each for a different catergory. Now, my problem is getting the options in the menus to open in the third frame on the right (named mainFrame).
Target is not a valid attribute for the OPTION tag. You will need to modify the function that gets called (MM_jumpMenu) to set the location in the correct frame.
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
So I need to change this to what? (the frame i want it in is called mainFrame)
Ok, having the code for the function clarifies it a little bit. So the first argument to that function is supposed to be the window you want to target, no changes needed to the function itself. Simply change the call to it on your onchange attribute to read:
MM_jumpMenu('mainFrame',this,0)
And you should be all set. The target was pointing to "parent" which means the links should have been opening in the main window, nuking your frameset in the process. Now they should go to the right place.
function MM_jumpMenu('mainFrame',this,0){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
Ah, I see. Sorry bout seeming like a moron. I DO know what Im doing most of the time. (but then again I normally spend time burried in pixels) {{GRAPHIX DESIGN}}
If you try to do this with JavaScript you will only find that it doesn't work for a good number of users. This method will always work:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Drop Down With Frames</title>
<form name="form1" action="form1.pl" target="mainFrame">
<div>
<select name="creator">
<option value="#Top" selected>Select One</option>
<option value="jassur.htm">Jassur</option>
<option value="xman.htm">Xman</option>
<option value="bball.htm">bball_1523</option>
</select>
<input type="submit">
</div>
</form>
And then get something like the following up and running and named something like "form1.pl":
#!usr/local/bin/perl
use CGI qw(redirect param);
print redirect param 'creator';
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
Opera 6.05. But like 12% of users I'm not using JavaScript. I can't stand people resizing my windows.
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
Bookmarks