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

[eluser]vincej[/eluser]
Thank you very much for this. Well I frigged around with it some more using your suggestion:

Code:
var token = {};
    token['csrf'] = document.getElementsByName("csrf_clftoken")[0].value;

The For Loop goes here, then later:


Code:
var params = 'ids='+parameter_string+token['csrf'];

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

Unfortunately I still could not get it to work. Still the same "Action not allowed .... "

The variables came out looking much the same as yesterday according to Google Chrome:

Code:
<return>: undefined
ajax: Object
csrf: "csrf_clftoken"
parameter_string: "4061:1,"
params: "ids=4061:1,c741e91716543ca1dbfba5e1203cd576"
real_id: "4061"
real_value: "1"
temp: Array[3]
tempid: "li_id_4061"
this: Window
token: Object

I'm thinking that simply passing in the token value is not enough. Should I not have to pass in the token name in a key:value pair ??

I don't know what to do next - perhaps replace the Ajax.Update with JQuery Ajax ?? The for loop does not have to change.

Many Thanks !


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