Hi Everyone! I'm currently working on MySQL/PHP/JavaScript project using AJAX. I came across some weird abnormality and wanted to share with you and hopefully find a solution to this problem.
for some reason alert(textarea2); shows nothing but if I place another alert(textarea2); right after the first one it works, second pop-up contains responseText....
also I've tried alert(resp.responseText); it worked fine, could someone please point me in the right direction, i really need some assistance, cheers!
new Ajax.Request("categories-inset.php",
{
method: 'get',
parameters : "divid=1&catid=14&subcatid=31",
onSuccess : function(resp)
{
textarea2=resp.responseText;
}
,
onFailure : function(resp)
{
alert("Oops, there's been an error.");
}
});
alert(textarea2);