I user jQuery’s ajax to sign up users. I use almost the exact code below to do similar stuff all over my site and yet for some reason the code below is throwing this error in Firebug.
Error:
uncaught exception: [Exception... "Not enough arguments" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js :: add :: line 5437" data: no]
Call:
lzaUserAPI.doAUserSignup(signupUsername, signupPassword, signupEmail, signupFullname, signupCompanyName, signupWebsite, signupPhone, lzaSigninup.onAUserSignedUp);
Ajax Function:
doAUserSignup : function(username, password, email, fullname, companyname, website, phone, callback){
// Add to server
var paras = {cmd : 'doAUserSignup', us: username, ps: password, em: email, flnm: fullname, cpnm: companyname, wbst: website, phne: phone};
$.ajax({
url: lzaUserAPI.m_url,
dataType: "json",
data: paras,
success: function(ret){callback(ret)}
});
},
Callback:
onAUserSignedUp : function (ret) {
alert ('yea!!!');
//Todo: log them in
}
Any ideas? Thanks in advance!
The problem is somewhere in the code that converts the data object. Since we can’t see all the code where exactly is not clear. Here is what you do, change the code like this:
See if that works, if it does start adding elements in till you find the problem.