Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • KTheB, you don’t have to, it’s really working great for me

    Change
    function getNextQuestion1(priority=0,user_id=0){

    /*………….*/
    }

    to

    function getNextQuestion1(priority,user_id){
    priority || (priority = 0);
    user_id || (user_id = 0);

    /*………….*/
    }

    The problem is with the function getNextQuestion1 whose variables have a wrong initialization it only works in Firefox but not in Chrome and IE. So change function variable from getNextQuestion1(priority=0,user_id=0) and let the function look like below; Please reply if it works.

    function getNextQuestion1(priority,user_id){
    priority || (priority = 0);
    user_id || (user_id = 0);
    jQuery(‘#wsp_container_1 #question_container’).hide();
    jQuery(‘#wsp_container_1 #wsp_wait’).show();

    var data = {
    ‘action’: ‘getNextQuestion’,
    ‘survey_id’: 1,
    ‘priority’ : priority,
    ‘user_id’ : user_id
    };

    jQuery.post(wsp_ajax_url, data, function(response) {
    jQuery(‘#wsp_container_1 #wsp_wait’).hide();
    jQuery(‘#wsp_container_1 #question_container’).html(response);
    jQuery(‘#wsp_container_1 #question_container’).show();
    });
    }

Viewing 3 replies - 1 through 3 (of 3 total)