Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open a new window pl. HELP :(

Status
Not open for further replies.

Technos

Programmer
Mar 15, 2002
47
US
Hi there,
I need to include 2 things in the following code.

1. I want to read the document from the location
location=" +
form.Benefits.options[ans].value;
I don't know how to insert this URL in javascript(/ forward slashes).

2. I want to open another window when I click "Go".

Code:
function productpage (form)
{
ans = form.Benefits.selectedIndex;
  location="[URL unfurl="true"]http://www.xyz.com/career/Jobs/"[/URL] + form.Benefits.options[ans].value;
}
</script>

<form>
  <div align=&quot;center&quot;><center>
<p><select name=&quot;Benefits&quot; style=&quot;font-family: Arial; font-size: 8pt&quot; size=&quot;1&quot;>
    <option value=&quot;Access_to_Computer_Systems_and_Data.asp&quot;>Access to Computers</option>
    <option value=&quot;Accidents_and_Injuries.asp&quot;>Accidents and Injuries</option>
</select>

<input type=&quot;button&quot; value=&quot;go!&quot; onclick=&quot;productpage(this.form)&quot;
  name=&quot;productsubmit&quot; style=&quot;font-family: Arial; font-size: 8pt&quot;>
  </div>

Please help me out.....thanks
 
You can put &quot;target=_blank&quot; in the a href tag. This will open up whatever the href points to in a new window. Ladyhawk. [idea]
** ASP/VB/Java Programmer **
 
Hi,
Can ue the following javascript code
<SCRIPT language=&quot;javascript&quot;>
window.open(&quot;windowname.asp&quot;,&quot;a name for the window&quot;,
[toolbar=yes/no,statusbar=yes/no,scrollbar=yes/no&quot;])
</SCRIPT>


toolbar=yes/no,statusbar=yes/no,scrollbar=yes/no&quot; --->optional
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top