N S

Novick Software
SQL Server Consulting • Design • Programming • Training

  andy novick is a sql server mvp

 

 

Tips and Tricks for:  HTML

The Problem:   Opening a new browser window when the user clicks a link.

Sometimes you don't want to take the user off your site.  How do you get a hyperlink to open a new window.


Solution: The target attribute of the anchor tag let's you open a new window.

In the anchor link, use the target attribute.  There are two options that will open new windows, target="main" and target="new".  Here's an example:

             <a href="http://www.NovickSoftware.com" target="new">

or

             <a href="http://www.NovickSoftware.com" target="main">

I generally prefer "new" because it opens a new window each time and it becomes visible.  If you use main, and the user had clicked on an earlier link that had target="main", the link may be processed by the previously opened windows.  Since that window might not be visible, the user can be frustrated by not seeing the page they requested.


RSS as HTML

Personal Blog

 
New Tips:

Use dsinit to set the SQL Server instance for Windows Azure dev storage

Upcoming
Presentations:

Code Camp 14
Oct 2, 2010
Data Dude
SQL Azure


Full Schedule