Blank message being passed back from .ajax() call is 13 characters in length?
Whats going on here then?
$(\"button#update\").click(function() {
var cat = $(\"select#cat_select\").val();
var dataString = $(\"form#project_update\").serialize(); \n";
$.ajax({
type: \"POST\",
url: \"index.php\",
data: dataString,
dataType: 'text', \n";
success: function( msg ) { \n";
console.log('msg is ' + msg); \n";
length = msg.length; \n";
console.log('length is ' + length); \n";
if (length > 13) { // no idea why a blank msg has a length of 13!!
alert(msg); \n";
$(\"#main\").load('?app=$app&func=$func&sub=ajax&ajaxSub=edit_project&cat=' + cat + '&proj_id=' + $proj_id).fadeIn('fast');
}
else {
$(\"#main\").load('?app=$app&func=$func&sub=ajax&ajaxSub=project_detail&cat=' + cat + '&proj_id=' + $proj_id).fadeIn('fast');
}
}
});
return false;
});
