Hi all,
I have submit a form through javascript (after some time delay using body onload) and input type is image, not button. If input type is button then form has submited, but in the case of image form not submitted. wht is problem.all frames are in same domain.
My code is
[HTML]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator " CONTENT="EditPl us">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Descripti on" CONTENT="">
<script>
function update(){
document.forms[0].submit.click() ;
}
function chk()
{
setTimeout("upd ate()","2000");
}
function ask()
{
alert("yes");
}
</script>
</HEAD>
<BODY onload="chk()">
<form name="frm" id="frm1" action="aa.php" method="post">
<input type="image" name="submit" src="arrow.png" value="submit" onclick="return ask();">
</form>
</BODY>
</HTML>[/HTML]
thanks in advance
I have submit a form through javascript (after some time delay using body onload) and input type is image, not button. If input type is button then form has submited, but in the case of image form not submitted. wht is problem.all frames are in same domain.
My code is
[HTML]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator " CONTENT="EditPl us">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Descripti on" CONTENT="">
<script>
function update(){
document.forms[0].submit.click() ;
}
function chk()
{
setTimeout("upd ate()","2000");
}
function ask()
{
alert("yes");
}
</script>
</HEAD>
<BODY onload="chk()">
<form name="frm" id="frm1" action="aa.php" method="post">
<input type="image" name="submit" src="arrow.png" value="submit" onclick="return ask();">
</form>
</BODY>
</HTML>[/HTML]
thanks in advance
Comment