HELP!!! HELP!!! need a proffesional to help me with this:

liunx

Guest
I tried to make a nice inner-menu with a drop down menu..<br />
i want to make these hyperlinks (htm files) inside another frame (main), i even described the whole page target frame, but NOTHING... tried also to add "target=main" after the "sepage01..." but again NOTHING.<br />
how can i make this drop down menu possible to open these selections inside MAIN frame and not the same one???<br />
please help me with this guys.<br />
thanks a lot.<br />
<br />
<br />
<br />
<select class="input" onchange="location = this.options[this.selectedIndex].value;" name="select" method="get"><br />
<option selected>News archive</option><br />
<option value="se_page01h3.htm">September 2002-January 2003<br />
</option><br />
<option value="se_page01h2.htm">January 2002 - March 2002<br />
</option><br />
<option value="sepage01h1.htm">June 2001 - November 2001<br />
</option><br />
<option value="sepage01h0.htm">Back to current news</option><br />
</select></a><!--content-->This should be posted in the javascript section. Try creating a function like this:<br />
<script language="javascript"><br />
function gothere(linkid)<br />
{parent.main.location=linkid}<br />
</script><br />
<br />
Then change your select to this:<br />
<select class="input" onchange="gothere(this.options[this.selectedIndex].value)" name="select"> <br />
<br />
Not sure why you have "method" in your select tag. I have not seen that before and don't think it is correct. I would also change the name "select" to something else as that could cause problems with JavaScript.<!--content-->Or:<br />
<br />
<select class="input" onchange="top.main.location.href = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/this.options">http://www.webdeveloper.com/forum/archi ... is.options</a><!-- m -->[this.selectedIndex].value;" name="select"><!--content-->Sorry for not writing earlier... these f*ckers just cut off my internet connection (not paying bills, as always:cool: )<br />
it worked like magic.. without any trouble..<br />
so somehow i can say, you're the most efficient fart i ever had :) thanks a lot!<!--content--><form><br />
<select name="PullDown"<br />
onChange="PageChanger(this.option[this.selectedIndex].value)"><br />
<option value="default">Select</option><br />
<option value="link">link</option><br />
<input type="button" name="go" value="go" onClick="PageChanger(document.NavForm.PullDown.optione[NavForm.PullDown.selectedIndex].value)"><br />
</form><br />
<br />
<br />
<script language="JavaScript"><br />
<!--<br />
function pagechanger(page)<br />
{<br />
document.location=page;<br />
document.NavForm.PullDown.options[0].selected=true;<br />
}<br />
//--></script><!--content-->What's that? (besides invalid and non-working...)<!--content-->Well, the function has to go in the 'head' apparently and the other stuff the body, just to clear that up. I have not tested it I just saw it and thought it was relavent. It should work, It is a combo box and onchange it redirects you to another page or on click of the button. Why did you try it and get a runtime error? Oh I see part of the problem is pagechanger should be PageChanger in the function.<!--content-->Originally posted by PeOfEo <br />
...did you try it and get a runtime error?Yes, there are error all over the script... Typo's, incorrect form references, incomplete HTML tags, etc...<!--content-->Thats because I typed it up real fast real late at night, so sue me (I am also not a huge fan of java script)<!--content-->Guess I was just curious why you thought it necessary to add anything at all to the thread, as apparently his question had already been answered, and you wern't providing a better or easier way of doing anything...<!--content-->Just wanted to throw my two cents in.<!--content-->Whatever... :rolleyes:<!--content-->
 
Back
Top