Click to See Complete Forum and Search --> : How do you make an external link to a third party website to pop-up in small window?
luckystrike
11-02-2003, 06:02 PM
I'm still quite a newbie and really need this function - how can i make a link to a third party website to pop-up in a new small window using html? - as opposed a user clicking on it and taking the place of my site's page thus losing traffic..
any help to a newbie would be appreciated :)
Andy - new webmaster at financial-spread-betting.com - and any tips on how I could improve the website given my limited abilities are welcome too :)
In HTML (requires a transitional doctype):
<a href="http://www.w3.org/" target="_blank">W3C</a>
In JavaScript:
<a href="http://www.w3.org/" onclick="window.open(this.href); return false;">W3C</a> and see http://www.webdevfaqs.com/javascript.php#popup for more info
AdamGundry
11-03-2003, 10:20 AM
Note that you should not be using popups on an accessible website. From the Web Content Accessibility Guidelines:
10.1 Until user agents allow users to turn off spawned windows, do not cause pop-ups or other windows to appear and do not change the current window without informing the user.
Adam
Robert Wellock
11-03-2003, 11:36 AM
You can use pop-ups on an accessible website but the idea is you inform the use either via plaintext or the title attribute like I do within this directory: http://www.xhtmlcoder.com/worthvalley/
What you shouldn't do is make auto-loading pop-ups or prevent the user from accessing the page if JavaScript is disabled.