Welcome Guest, Not a member yet? Register   Sign In
Disallowed Key Characters
#6

[eluser]CroNiX[/eluser]
Hard to decipher everything you have there as some of it seems overly complex, and without seeing the form side of things, but try this:
Code:
function jsUpdateCart() {
    var params = {}; //create new object
    params['csrf_clftoken'] = document.getElementsByName("csrf_clftoken")[0].value; //add the csrf key:value

    //cycle through and add all other key:value pairs
    var allNodes = document.getElementsByClassName("process");
    for(i = 0; i < allNodes.length; i++) {
       var temp = allNodes[i].id.split('_');
       params[temp[2]] = allNodes[i].value;
    }

    var ajax = new Ajax.Updater(
'ajax_msg','http://localhost/mysite/index.php/welcome/ajax_cart', {method:'post',parameters:params,onComplete:showMessage}
    );
}


Messages In This Thread
Disallowed Key Characters - by El Forum - 07-09-2014, 11:29 PM
Disallowed Key Characters - by El Forum - 07-10-2014, 02:40 AM
Disallowed Key Characters - by El Forum - 07-10-2014, 08:09 AM
Disallowed Key Characters - by El Forum - 07-10-2014, 11:08 AM
Disallowed Key Characters - by El Forum - 07-10-2014, 11:27 AM
Disallowed Key Characters - by El Forum - 07-10-2014, 12:02 PM
Disallowed Key Characters - by El Forum - 07-10-2014, 10:55 PM



Theme © iAndrew 2016 - Forum software by © MyBB