Click to See Complete Forum and Search --> : correct pop up window


bh3
10-22-2003, 09:38 PM
What is the correct way to code for a pop up window? I have seen both ways. Both work on most browsers but Safari chokes and you must click twice to get it to work(on either code)

<a href="homepage.asp" onclick="javascript:window.open('newpopup.asp', 'name', 'width=750,height=350'); return false;"><img src="pic" alt="" width="149" height="208"></a>

<a href="#" onclick="javascript:window.open('newpopup.asp', 'name', 'width=750,height=350'); return false;"><img src="pic" alt="" width="149" height="208"></a>


or is there a completely different standard code that I am missing. I am looking for the best code that will work on the most browsers. Thanks!

fredmv
10-22-2003, 09:42 PM
This is the correct way:<a href="something.html" href="window.open(this.href, '', '');return false;">New window.</a>However, I would actually not recommend opening new windows as it destroys accessibility (http://www.diveintoaccessibility.org/day_16_not_opening_new_windows.html). ;)