Web Team Procedures and Notes

This page is intended for use only by the Web Team.

Standards-Compliant New Window Links (aka popup windows)

Test of a completely accessible popup window with window size set:

  1. BEST OPTION IN MOST CASES (because uses focus to bring new window in front of other windows):

    Ohlone College home page (new window) (uses windowname, window.open(), and focuses popup window)
    <a href="http://www.ohlone.edu/" 
    target="newWindow2"
    onclick="var w=window.open(this.href, this.target,
    'width=400,height=400,scrollbars=yes,resizable=yes');
    w.focus();
    return false;">Ohlone College home page (new window)</a>
  2. Good but doesn't focus new window:

    Ohlone College home page (new window) (uses windowname and window.open())
    <a href="http://www.ohlone.edu/" 
    target="newWindow"
    onclick="window.open(this.href, this.target, 'width=400,height=400,scrollbars=yes,resizable=yes'); return false"
    >Ohlone College home page (new window)</a>
  3. Good but relies on global javascript file never changing and always being linked to:

    Ohlone College home page (new window) (uses windowname and function created in global JavaScript file; focus() is included)
    <a href="http://www.ohlone.edu/" 
    target="newWindow3"
    onclick="javascript:openwindow(this.href,this.target,'width=400,height=400,scrollbars=yes,resizable=yes');return false;">Ohlone College home page (new window)</a>
  4. DO NOT USE THIS METHOD (target attribute is deprecated):

    Ohlone College home page (new window) (uses deprecated target="_blank" attribute of <a> tag)
    <a href="http://www.ohlone.edu/" 
    target="_blank"
    onclick="window.open(this.href, this.target, 'width=400,height=400,scrollbars=yes,resizable=yes'); return false"
    >Ohlone College home page (new window)</a>

References

Footer

Repeated Sidebar Nav