WordPress.org

Ready to get started?Download WordPress

Forums

I have to open a new formatted window (1 post)

  1. Sam9999
    Member
    Posted 5 years ago #

    Maybe I need a php script that do it!
    With javascript is like after but it don't work inside the home page:

    <script language='javascript'>
    var chatPopupWindow=null;
    function chatPopup(mypage,myname,w,h,pos,infocus){
    if(pos=='random'){
    LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
    TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
    if(pos=='center'){
    LeftPosition=(screen.width)?(screen.width-w)/2:100;
    TopPosition=(screen.height)?(screen.height-h)/2:100;}
    else if((pos!='center' && pos!='random') || pos==null){LeftPosition=100;TopPosition=100;}settings='width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,dependent=no';
    chatPopupWindow=window.open('',myname,settings);
    if(infocus=='front'){chatPopupWindow.focus();chatPopupWindow.location='http://www.mysite.com/index.htm';}
    }
    </script>

    Click Here

Topic Closed

This topic has been closed to new replies.

About this Topic