hello, I wonder if it is possible to refresh a div tag in javascript?
My ajax script
<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)
{
document.getElementById('tableDLI').outerHTML = retour.responseText;
}else
{
document.getElementById('tableDLI').innerHTML = "uncool";
}
}
</script>
My html body
<h2 class="surlignageHaut">Restriction d'accés aux données</h2>
<label for="selectDR" >DR de l'utilisateur</label>
<html:select property="utilisateur.DR" size="1" styleId="selectDR" styleClass="saisie" style="position:relative;top:2px;left:5px;" onchange="actualiserDLIS();">
<html:optionsCollection property="optionsDRS" label="libelle" value="code"/>
</html:select>
<br/>
<br/>
<div id="tableDLI">
</div>
</div
when i select a data in my list, i do my ajax request and i have a table, when I reselect a different value in my list, my table does not update