Solved

New Page

Posted on 1998-07-28
3
164 Views
Last Modified: 2010-04-09
What is the HTML tags or procedure to have your browser open a new Window when a
page is loaded or a link is clicked?
Where do I place this tag?
0
Comment
Question by:Protorian1
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
vendrig earned 10 total points
ID: 1844937
The JavaScript procedure is
window.open("page.html", "MyNewWindow")
To open a window when a page is loaded, simply put it in the body tag:
<BODY onLoad='window.open("page.html", "MyNewWindow")'>
To open a window when a link is clicked, put it in the relevant anchor:
<a href="page1.html" onClick='window.open("page2.html", "MyNewWindow")'>blabla</a>
Note the use of single and double quotes.
0
 
LVL 28

Expert Comment

by:sybe
ID: 1844938
It can be done using only HTML, no javascript needed:

<a href="newpage.htm" target="newwindow">open this in a new window</a>

It will open a new window when the name "newwindow" is not yet in use for a frame or window.

0
 
LVL 2

Expert Comment

by:vendrig
ID: 1844939
Yep, sybe.
Note that the JavaScript procedures have other effects though.
Use the scripts if you need to load more than one page at the time,
otherwise the target attribute is sufficient.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
insert text field data into html script 13 41
Add image to into animation on website template 1 27
Only three borders showing on image 5 19
Javascript_Set_dropdown_value 7 32
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question