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!

Pop-up windows

Status
Not open for further replies.

donlste

Programmer
Sep 19, 2001
14
0
0
GB
Hi there,

Can anyone help me.

I was after some help for creating a pop-up window from some text? Does anyone have the script?

Thanks very much,
Donna
 
to make a link open a new window there are two methods. The non javascript method is to include a target attribute in the link tag like this:
Code:
<a href=&quot;#&quot; target=&quot;_blank&quot;>link text</a.
This will open a new window with the users default settings for toolbars etc. Alternatively you can use javascript to open a new window and have control over the display of toolbars, scrollbars, size, status bar etc like this:
Code:
<a href=&quot;#&quot; onclick=&quot;window.open('mypage.htm','mywindow','height=200,width=300'); return false;&quot;>link text</a>
This will open a popup window called mywindow with the page mypage.htm loaded in. The window will be 300px wide and 200px high. There are other properties you can specify such as scrollbars,location,status,toolbar. These all take a yes or no value and would be included with within the same set of single quotes as the width and height and comma seperated. Note the use of return false to rpevent the link from firing the href and refreshing the page.

Hope this helps

Rob
 
Donna,

You'll find that the sentiment here is AGAINST popup windows unless they're links clicked on by the user. The involuntary ones are annoying (at best), and with all the popup killers available today, more and more people are avoiding them, which means whatever information you have in one will be lost to many of your viewers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top