javascript popup window with correct data

Posted by Christian on Stack Overflow See other posts from Stack Overflow or by Christian
Published on 2012-03-23T14:14:41Z Indexed on 2012/03/23 23:30 UTC
Read the original article Hit count: 142

Filed under:

I want this code below open in a popup window. How do I do?

html->

<td align="right"><a onclick="confirmSubmit();" target="paywin" class="button"><span><?php echo $button_continue; ?></span></a></td>

Java ->

var newwin = null;
function confirmSubmit() {
    $.ajax({
        type: 'GET',
        url: 'index.php?route=payment/dibs/confirm',
        success: function() {
            $('#checkout-form').submit();
        }

    });
}
//--></script>

I tried something like this:

var newwin = null;
function confirmSubmit() {
    $.ajax({
        type: 'GET',
        url: 'index.php?route=payment/dibs/confirm',
        success: window.onload = function() {
            $('#checkout-form').submit();
        }

    });
    window.open('http://www.melacs.com/index.php?route=payment/dibs/confirm')
}
//--></script>

© Stack Overflow or respective owner

Related posts about popup