PDA

View Full Version : Mastering popup window using javascript



Webiter
12-30-2011, 08:04 PM
At this test position (http://www.postbox.webitry.net/subscribe.html) there is a Subscribe facility that could be on a website page!

I am seeking to have the thanks.php page message present in a popup when a visitor fills out and submits the Subscribe Email.

I have included the following javascript on the subscribe.html page to help achieve this:


function popup_win(theURL,winName,winOptions) {
win = window.open(theURL,winName,winOptions);
win.focus();
}

function thankyou() {
document.action = " ";
popup_win(' ',' ','resizable=yes,scrollbars=yes,width=180,height=180');
document.target = " ";
document.submit();
}

Could I get some help with the blanks in the thankyou function snippet...!