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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open page into new window; page is action of form

Status
Not open for further replies.

Candyb

Technical User
Oct 2, 2001
12
CA
Hi,

I have a form with action="display.asp" and I was just wondering how one could open the display.asp in a new window. When the form is submitted it sends the form to the asp in the same window. How do you force it to open in a new window?

I know that you can do this with direct href links.
Is it possible to open forms action pages in new windows?
Thanks,
Candy
 
Try this :

<script language=&quot;JavaScript&quot; type=&quot;text/JavaScript&quot;>
<!--
function submitform() {
window.open('display.asp?search_string='+document.myform.search_string.value )
}
//-->
</script>

<form method=&quot;post&quot; name=&quot;myform&quot;>
<input type=&quot;text&quot; name=&quot;search_string&quot;>
<input type=&quot;button&quot; value=&quot;Go&quot; onclick=&quot;submitform()&quot;>
</form> Regards

Big Dave

davidbyng@hotmail.com


** If I am wrong I am sorry, but i'm only trying to help!! **

 
You can also write like this:

<input type=&quot;button&quot; value=&quot;Go&quot; onclick=&quot;window.open('display.asp?search_string='+document.myform.search_string.value )&quot;>
------------------
Freedom is a Right
 
You can also do it quite simply by adding
Code:
target=&quot;_blank&quot;
to your <form ...> tag. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Tracy's suggestion is the way to go!! Mise Le Meas,

Mighty :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top