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

opening new window from function

Status
Not open for further replies.

MarkJ2

Technical User
Sep 25, 2001
17
0
0
US
I am writing an HTML page that has a 'button' that sorts some information. When the function is called, I would like it to open a new window to display the information, as opposed to the information being displayed in the same window that the 'button' is in.

Thanks!
 
Use window.open() method in the Javascript function which you are going to call on click of the button.
For e.g. you have Page1.html on which you have button called open, onclick of which you want to open a new window say Page2.html by calling a function fnOpen(). In fnOpen() you write window.open(path of page2).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top