E-mail List Archives
RE: Best practice for warning users of opening window
From: Patrick Lauke
Date: Aug 12, 2005 11:12AM
- Next message: Mark Magennis: "RE: Images with captions and alt"
- Previous message: ben morrison: "Re: Best practice for warning users of opening window"
- Next message in Thread: Conyers, Dwayne: "RE: Best practice for warning users of opening window"
- Previous message in Thread: ben morrison: "Re: Best practice for warning users of opening window"
- View all messages in this Thread
> Paul Collins
> The line of code I am using is:
> <a onclick="popUp(this.href,'fixedscroll');return false;"
It shouldn't just return false. It should check whether or not a
new window popped up successfully, and only return false if that's the
case. Even in the "javascript on" scenario, a popup blocker may have
prevented the popUp function from working...if you then return
false under the assumption that it did work, you've effectively disabled
the link.
Depending on how your popUp function works, the change should just be
minimal though. Essentially, you want popUp to return whether or not
the call to window.open was successful.
function popUp(...) {
...
return window.open(...);
}
and in your link
onclick="return !popUp(...);"
Patrick
___________
Patrick H. Lauke
Webmaster / University of Salford
http://www.salford.ac.uk
___________
Web Standards Project (WaSP) Accessibility Task Force
http://webstandards.org/
___________
- Next message: Mark Magennis: "RE: Images with captions and alt"
- Previous message: ben morrison: "Re: Best practice for warning users of opening window"
- Next message in Thread: Conyers, Dwayne: "RE: Best practice for warning users of opening window"
- Previous message in Thread: ben morrison: "Re: Best practice for warning users of opening window"
- View all messages in this Thread