I have a page index.php On index.php i load another page(new_case_form.php) into index.php with AJAX into my div witch have an id of "out" like this.
function new_case(){
if (window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else {// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
document.getElementById("out").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","new_case_form.php",true);
xmlhttp.send();
}
On my new_case_form.php file i include a upload file but it doesnt work.
If i just load the new_case_form.php direct in my web browser without go through index.php, it works just fine. But if i call the page with ajax from index.php then it will not work.
Any ideas why?
I dont know if you answer to questions like this but i really need to get this to work. And i havent found any other with this problem. Maybe i google it wrong :)
The upload script is from http://blueimp.github.io/jQuery-File-Upload/
Have a nice day.
Best Regards from Sweden