I have a page of links with 14 drop down menus for different categories of links: [URL=http://www.myprojectcar.net/menu3.html]my menu page[/URL] My question is this: is it possible to force the links to open in a new window like the target=new in html? I would like for people to not leave my site completely if possible.
@blade69Oct 24.2004 — #I'm having kinda the same problem, [URL=http://www.mycasinonline.biz/]My site[/url] is in frames in html, and I'm using flash links. I need to set these javascript links to open in a new window, otherwise they open inside my webpage in the main frame.
@cosmosisauthorOct 24.2004 — #You can never assume anything where I am concerned except that I will always have questions. I know nothing of javascript except that I can get free scripts online that will work for me. I tried your idea and it did not work. When I put the window.open inside the OPTION tag and tried the menu I got the "page not found" thing. I can see how the window.open thing would work if you had one submit button for each link you are trying to create. Doesnt seem to work with multiple links like I have.
@blindrainOct 24.2004 — #[CODE] <SCRIPT language=JavaScript> <!-- Begin function formHandler(form){ var URL = document.form.site.options[document.form.site.selectedIndex].value; window.open(URL); } // End --> </SCRIPT>
<!-- onchange=javascript:formHandler() copy this to the select tag if you don't want to have to click on the button-->[/CODE] you'll find this @[URL=http://home.comcast.net/~rfdwhitacre]home.comcast.net/~rfdwhitacre[/URL] Except it does not open in a new window I modified it a little just so that it would open in new window i took out "window.location.href = URL;" and put in "window.open(URL);"
@cosmosisauthorOct 24.2004 — #Well blindrain you certainly answered my prayers! I adopted your code and it works perfectly on my site. Here is the updated menu page with the new code installed: [URL=http://www.myprojectcar.net/menu3a.html]my menus[/URL]
I even figured out how to make multiple scripts work on the same page. Thanks ever so much.
Now for another quick question ... How can I get the text in the choice boxes to be centered? Is there a style tag for that?