function apiPost(args, apiMethod, params) {
        var apiCallRef = ++apiCallCnt;
        var targetName = "_target" + apiCallRef;
        var extracted = extractArgs(args);

        var $container = $('<div style="display: none"></div>');
        var $iframe = $('<iframe name="' + targetName + '"></iframe>');
        var $form = $('<form method="POST" target="' + targetName
            + '" action="http://disqus.com/api/' + apiMethod + '/"></form>');

        var data = $.extend({
            api_version: "1.1",
            api_response_format: "jsonp:void" // No return
        }, params, extracted.options);

        for (var p in data) {
            $form.append($('<input type="hidden" name="' + p
                + '" value="' + data[p] + '"/>'));
        }

        $("body").append($container.append($iframe).append($form));

        $iframe.load(function () {
            setTimeout(function () {
                log(apiMethod + " (" + apiCallRef + ") done");
                container.remove();
                extracted.successFn && extracted.successFn();
            }, 1);
        });
        
        log("Invoking " + apiMethod + " (" + apiCallRef + ")");

        $form.submit();
    }
/**
     * Cross-domain POST through form submit, with no access to response
     */
Cross-domain POST through form submit, with no access to response
Cross - domain POST through form submit with no access to response
function apiPost(args, apiMethod, params) {
        var apiCallRef = ++apiCallCnt;
        var targetName = "_target" + apiCallRef;
        var extracted = extractArgs(args);
        var $container = $('<div style="display: none"></div>');
        var $iframe = $('<iframe name="' + targetName + '"></iframe>');
        var $form = $('<form method="POST" target="' + targetName
            + '" action="http://disqus.com/api/' + apiMethod + '/"></form>');
        var data = $.extend({
            api_version: "1.1",
            api_response_format: "jsonp:void" 
        }, params, extracted.options);
        for (var p in data) {
            $form.append($('<input type="hidden" name="' + p
                + '" value="' + data[p] + '"/>'));
        }
        $("body").append($container.append($iframe).append($form));
        $iframe.load(function () {
            setTimeout(function () {
                log(apiMethod + " (" + apiCallRef + ") done");
                container.remove();
                extracted.successFn && extracted.successFn();
            }, 1);
        });
        log("Invoking " + apiMethod + " (" + apiCallRef + ")");
        $form.submit();
    }
function apiPost ( args , apiMethod , params ) { var apiCallRef = ++ apiCallCnt ; var targetName = "_target" + apiCallRef ; var extracted = extractArgs ( args ) ; var $container = $ ( '<div style="display: none"></div>' ) ; var $iframe = $ ( '<iframe name="' + targetName + '"></iframe>' ) ; var $form = $ ( '<form method="POST" target="' + targetName + '" action="http://disqus.com/api/' + apiMethod + '/"></form>' ) ; var data = $ . extend ( { api_version : "1.1" , api_response_format : "jsonp:void" } , params , extracted . options ) ; for ( var p in data ) { $form . append ( $ ( '<input type="hidden" name="' + p + '" value="' + data [ p ] + '"/>' ) ) ; } $ ( "body" ) . append ( $container . append ( $iframe ) . append ( $form ) ) ; $iframe . load ( function ( ) { setTimeout ( function ( ) { log ( apiMethod + " (" + apiCallRef + ") done" ) ; container . remove ( ) ; extracted . successFn && extracted . successFn ( ) ; } , 1 ) ; } ) ; log ( "Invoking " + apiMethod + " (" + apiCallRef + ")" ) ; $form . submit ( ) ; }
Cross-domain POST through form submit, with no access to response
Cross - domain POST through form submit with no access to response
// No return
