Iklan

Java Script Code for Automatic Popup in PHP


I have problem with popup plugins in WordPress. Shortcodes Ultimate plugin make other popup plugin disable. So I try to use this code instead.

Index.html

function popup() {
myURL = "http://www.media-islam.or.id";

splashWin = window.open("",'_blank','toolbar=0,status=0,menubar=0,scrollbars=auto,resizable=0,width=150,height=450');

splashWin.blur();
window.focus();
splashWin.location=(myURL);
}

another program

//another program

function PopupCenter(url, title, w, h) {
// Fixes dual-screen position Most browsers Firefox
var dualScreenLeft = window.screenLeft != undefined ? window.screenLeft : screen.left;
var dualScreenTop = window.screenTop != undefined ? window.screenTop : screen.top;

width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width;
height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height;

var left = ((width / 2) - (w / 2)) + dualScreenLeft;
var top = ((height / 2) - (h / 2)) + dualScreenTop;
var newWindow = window.open(url, title, 'scrollbars=yes, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);

// Puts focus on the newWindow
if (window.focus) {
newWindow.focus();
}
}

PopupCenter('http://media-islam.or.id','xtf','900','500');

Referensi:

http://www.xtf.dk/2011/08/center-new-popup-window-even-on.html

 

Problem Shortcodes Ultimate:

$new_content .= wptexturize( wpautop( $piece ) );

to

$new_content .= $piece;

 

 

http://www.webhostingtalk.com/showthread.php?t=143320

Iklan

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: