now i dont have any problem working around to change the status for the order or manipulating the values of the databases, but there is a serious issue with IE 8 that , when i click update button the script executes ,accesses the file and when it enter the onreadystatechange event as soon as it checks the xmlhttpobj.status or xmlhttpobj.readyState it gives me unspecified error
i have been working with AJAX for so long but i couldnot
figure out this error any body here to help
Expand|Select|Wrap|Line Numbers
- <td align='center' class='textnormal' valign="middle">
- <input type="text" name="order_id_<?=$countO?>" id="order_id_<?=$countO?>" value="<?=$order_id?>" style="width:25px;" />
- <a href="#." onclick="chkExist(document.getElementById('order_id_<?=$countO?>').value,document.getElementById('home_id_<?=$countO?>').value,'<?=HOMES?>')">Update</a> </td>
- <input type="hidden" name="home_id_<?=$countO?>" id="home_id_<?=$countO?>" value="<?=$home_id;?>" />
Expand|Select|Wrap|Line Numbers
- var xmlOderUpdate=null;
- function updateOrder(orderId,rec_id,table){
- xmlOderUpdate=GetXmlHttpObject();
- if(xmlOderUpdate==null){
- alert("you need to upgrade your browser");
- return;
- }else{
- var url="ajax/order-update.php";
- var str="table="+table+"&orderId="+orderId+"&rec_id="+rec_id;
- xmlOderUpdate.onreadystatechange=$updateOrder;
- xmlOderUpdate.open("POST",url,true);
- xmlOderUpdate.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
- xmlOderUpdate.send(str);
- }
- }
- function $updateOrder(){
- if(xmlOderUpdate.readyState==4){
- if(xmlOderUpdate.status==200){
- if(xmlOderUpdate.responseText=="done"){
- location.replace(window.location());
- }else{
- alert("There was a problem updating, please try later");
- }
- }
- }
- }
- var xmlIsThere=null;
- function chkExist(orderId,rec_id,table){
- xmlIsThere=GetXmlHttpObject();
- if(xmlIsThere==null){
- alert("you need to upgrade your browser");
- return;
- }else{
- var url="ajax/order-chk.php";
- var str="table="+table+"&orderId="+orderId+"&rec_id="+rec_id;
- xmlIsThere.onreadystatechange=$chkExist;
- xmlIsThere.open("POST",url,true);
- xmlIsThere.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
- xmlIsThere.send(str);
- }
- }
- function $chkExist(){
- if(xmlIsThere.readyState==4){
- if(xmlIsThere.status==200){
- var res=xmlIsThere.responseText;
- var resar=res.split("|");
- if(resar[0]=="Yes"){
- var act=confirm('Position Already defined Do You Still Want to update');
- if(act==true){
- updateOrder(resar[1],resar[2],resar[3]);
- }
- }else{
- updateOrder(resar[1],resar[2],resar[3]);
- }
- }
- }
- }