473,387 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

need to open options url into a new window

i need to have these links open into a new window and can't figure out
how.

any help would be greatly appreciated.

Thanks,

b
here's the following code:

<SCRIPT TYPE="text/javascript">
<!--
function dropdown(mySel)
{
var myWin, myVal;
myVal = mySel.options[mySel.selectedIndex].value;
if(myVal)
{
if(mySel.form.target)myWin = parent[mySel.form.target];
else myWin = window;
if (! myWin) return true;
myWin.location = myVal;
}
return false;
}
//-->
</SCRIPT>

<FORM
ACTION="../cgi-bin/redirect.pl"
METHOD=POST onSubmit="return dropdown(this.gourl)">
<SELECT NAME="gourl">
<OPTION VALUE="">LHD Emergency Response Folder...
<OPTION VALUE="http://google.com">Google
<OPTION VALUE="http://yahoo.com">Yahoo

</SELECT>

<INPUT TYPE=SUBMIT VALUE="Go">
</FORM>

Feb 20 '07 #1
1 1558
ASM
bw******@globalsecurecorp.com a écrit :
i need to have these links open into a new window and can't figure out
how.

any help would be greatly appreciated.

Thanks,

b
here's the following code:

<SCRIPT TYPE="text/javascript">
<!--
/***
* To load in main window (not in frames)
***/
function dropdown(mySel)
{
var myIndex = mySel.selectedIndex;
if(myIndex==0) alert('choice in the list');
else
top.location = mySel.options[myIndex].value;
return false; // too late ! a new page was called !
}

/***
* to load in a "new" window
* you have to open this "new" window
***/

var truc = false;

function dropdown(mySel)
{
var myIndex = mySel.selectedIndex;
if(myIndex==0) alert('choice in the list');
else {
if(truc && !truc.closed)
{
truc = window.open();
}
truc.location = mySel.options[myIndex].value;
truc.focus();
}
return false;
}
//-->
</SCRIPT>

<FORM
ACTION="../cgi-bin/redirect.pl"
METHOD=POST onSubmit="return dropdown(this.gourl)">
<SELECT NAME="gourl">
<OPTION VALUE="">LHD Emergency Response Folder...
<OPTION VALUE="http://google.com">Google
<OPTION VALUE="http://yahoo.com">Yahoo
</SELECT>

<INPUT TYPE=SUBMIT VALUE="Go">
</FORM>

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Feb 20 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Rob Wahmann | last post by:
I'm having trouble with the following code appending the form name and an empty value to the end of the url. Can anyone tell me what's wrong? I appreciate any tips or advice you can pass along! ...
2
by: tmb | last post by:
- Want to open a 2nd browser window when someone clinks a link with the link content inside it. - Want to control window size - Want all tool bars so only blue bar at top shows - Can I put my...
6
by: Dropstengel | last post by:
Hi, Although I'm very familair with C++ programming, I'm having some problems coding up a piece of JavaScript for my sister in law. The problem is the following: From a website I need to...
15
by: dixie | last post by:
I have a command to open the Access Options dialogue from code: DoCmd.RunCommand acCmdOptions It also opens the Database Window behind it. Is it possible to open the Options without having...
13
by: Trint Smith | last post by:
Ok, On my website, tribidz.com, there is one page that needs to not have any buttons or menu or address bar. How can I do this? What is the html code or whatever? Thanks, Trint ..Net...
3
by: Shapper | last post by:
Hello, I am working on an ASP.NET/VB web site. I have several links including menu links. Considerer a want to load a page named page.aspx. I can do it using javascript. Or using this code:...
4
by: Csaba Gabor | last post by:
Up until a few weeks ago, javascript code like window.open("http://mydomain.com", "windowName"); would always bring my new or reused window to the top, with focus. Lately, Firefox (Deer park...
20
by: mike | last post by:
I help manage a large web site, one that has over 600 html pages... It's a reference site for ham radio folks and as an example, one page indexes over 1.8 gb of on-line PDF documents. The site...
7
by: chambers.anya | last post by:
Hi, I've just been scouring the web trying to find an answer for how to do this but so far without any success. Basically I want some of the links in my page to open in new tabs (I'm using...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.