I want to transfer a value "re1" to ldapDeleteUserE xec.php
The "alert(document .ha)" appears a dialog and shows "undefined. "
The "alert(document )" shows "object"
But there seems some problem:
The error msg said "document.ha.re 1" is null or not a object
and can't transfer to the ldapDeleteUserE xec.php
My friend told me that may be a DOM(Document Object Model) problem.
He said it maybe lack of some tags
Can anyone give me some suggestions.
Thanks a lot
The whole php file is in http://nopaste.snit.ch:8001/1864
(although it's a php file, but I guess the problem is about html and
javascript)
The "alert(document .ha)" appears a dialog and shows "undefined. "
The "alert(document )" shows "object"
But there seems some problem:
The error msg said "document.ha.re 1" is null or not a object
and can't transfer to the ldapDeleteUserE xec.php
My friend told me that may be a DOM(Document Object Model) problem.
He said it maybe lack of some tags
Can anyone give me some suggestions.
Thanks a lot
Code:
<script language="JavaScript">
function confirmDelete(){
alert(document.ha); //<------------here shows undefined
// but alert(document) shows
isDelete = confirm("Are you sure you want to delete?");
if(isDelete == false){
document.ha.re1.value="0";
alert(document.ha.re1.value);
}else{
alert(document.ha.re1.value);
document.ha.re1.value="1";
}
alert(document.ha.re1.value);
document.ha.submit();
}
confirmDelete();
</script>
<form name="ha" action="./ldapDeleteUserExec.php" method="post">
<input type="hidden" name="re1" value=""></input>
<input name="authority" type="hidden" value="$authority" ></input>
<input name="dealedUserName" type="hidden" value="$dealedUserName"[color=blue]
></input>[/color]
</form>
(although it's a php file, but I guess the problem is about html and
javascript)
Comment