Web Analytics Made Easy -
StatCounter Auto-centering Pop up window - CodingForum

Announcement

Collapse
No announcement yet.

Auto-centering Pop up window

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Auto-centering Pop up window

    When using this script, I get the "done, but with errors" message. Everything seems to be working? I am also using the topmenu 4 script.....is using other javascripts messing it up?

    header script:
    <script language="javascript">

    /*
    Auto center window script- Eric King (http://redrival.com/eak/index.shtml)
    Permission granted to Dynamic Drive to feature script in archive
    For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
    */

    var win = null;
    function NewWindow(mypage,myname,w,h,scroll){
    LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
    settings =
    'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
    win = window.open(mypage,myname,settings)
    }

    </script>


    and this is in the body:

    a href="http://wsabstract.com" onclick="NewWindow(this.href,'name','400','400','yes');return false">Website Abstraction</a>

  • #2
    OK, can I use that script if I have more text links that I want to open to a new window? If so....how?

    Thanks!

    Comment

    Working...
    X