Ajax函数适用于Firefox但不适用于IE 6

时间:2010-07-19 09:37:10

标签: ajax jsp

我有一个适用于Firefox的Ajax功能,但不适用于IE 6

我的ajax脚本:

<script type="text/javascript">

function actualiserDLIS(){
 var url = 'administration/gestionUtilisateurs.do?method=actualisationDLIs';
 var params =  'DR='+encodeURIComponent(document.getElementById('selectDR').value);
    var myAjax = new Ajax.Request(
            url, 
            {   method: 'post',
             parameters: params,
                onComplete: majDLIS
            });
}

function majDLIS(retour){
 if (retour.status == 200)
    {
        alert("Retour Status: "+retour.responseText);
        document.getElementById('tableDLI').innerHTML = retour.responseText;
    }else{
      document.getElementById('tableDLI').innerHTML = "uncool";
    }

}

</script>

<body>

[...]

<table class="tabForm" id="tableDLI">
   <c:forEach var="DLI"   items="${sessionScope['fiscalite.AdministrationGestionUtilisateurForm'].DLISUtilisateur}"  varStatus="status" >
      <tr>
         <td class="label_tableau_type1 width200px" ><c:out value="${DLI.code}"/>
         </td>            
      <td class="width150px" colspan="3"><html:checkbox property="DLI(${status.count-1})"/>
         </td>
      </tr>
       </c:forEach>
      </table>

[...]

在我的警报中我正在恢复我希望在tableDLI

中显示的数据

1 个答案:

答案 0 :(得分:0)

显然你正在使用Prototype。首先,我必须提到针对IE6是错误的,更糟糕​​的是,它是邪恶的。众所周知,这种浏览器以各种方式被打破。你可能在浏览器中有javascript错误,它们是什么?

Here is a what can be a useful link