hi, im fairly new to najax and i am assuming its similar to ajax, but iv been asked to fix a website which uses it to interact with its database, they upgraded their server from php4 to php5 and the website stopped working, so they asked me to fix it. i got rid of the errors that appeared but it still doesnt perform its functionality. below is the ihtml file which calls the NAjax
{NAJAX}
<script type="text/javascript">
var najaxObj ={NAJAX_OBJ};
function callNAJAXFunc()
{
args =arguments;
var funcName = args[0];
var formName = args[1];
var buildErrorFunc = "najaxObj.on" + funcName + "error = function(error) {\n"+
"alert('Error ' + error.message);\n"+
"return true;\n"+
"}";
eval(buildErrorFunc);
var buildNAJAXFunc = "najaxObj." + funcName + "(najax.html.exportForm('" + formName + "')";
for (var i=2; i<args.length; i++)
{
buildNAJAXFunc += ",";
buildNAJAXFunc +="args["+i+"]";
alert(args[i]);
}
buildNAJAXFunc += ", jsExec)";
alert (buildNAJAXFunc);
eval("buildNAJAXFunc");
}
function jsExec(result)
{
if (result!='true' || result!='false')
{
eval(result);
}
}
</script>
basically by "alert" i can print out the values that should be entered and they seem to be correct, but then and error appeared on the eval(buildNAJAXFunc) "Object doesnt support this property or method". to fix that i added the quotations around the function. what its meant to do is extract arguements when a user clicks addtobasket, then the arguemetns are extracted by the args array and added to buildNAJAXFunc and finally is evaluated (eval) and the product is added to basket...only it doesnt add to basket. spent several weeks at this and seem to have run to a dead end. thanks