Functions dont work from included files.
I am using prototype, and I made a function that returns if an input is valid. Well firebug, said the response headers were fine.
But in my html/php file, it acts like the function doesn't exists
Code:
function ValidateInput( elem, a, m, input_var, input )
{
new Ajax.Request("../../ajax?a="+a+"&"+input_var+"="+input,
method: m,
onSuccess:function(transport)
{
$(elem).innerHTML = transport.responseText;
return;
},
onFailure: function(transport) {
$(elem).innerHTML = "doesn't work";
return;
}
);
}
my function, this doesnt work, yes the ajax.php exists, and yes I checked if ajax.php works.
|