zuzupus
06-20-2003, 09:44 AM
hi,
i created an text field with image and submit button,the problem is when i click on edit.gif the form is submitting i dont understand why
the functionality of save button is workign on this image
<form NAME=test>
<input type="text" name="text" size="10">
<input type="image" src="../img/edit.gif" onClick="thew=window.open('window.html','newWin','width=200,height=150,top=400,left=600,dependent=yes,alwaysR aised=yes,resizable=no')" width="16" height="16" border="0" alt="Edit Text"></a>
<input type="button" class="button" value="Save" name="Save" border="1" onclick="go();">
</form>
<script language="JavaScript">
function go(){
document.test.submit();
}
</script>
this is window.html code
<HTML>
<head><title>edit</title></head>
<CENTER>
<FORM NAME=aform>
<BODY bgcolor="#FF9900" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
<textarea NAME=text1 wrap="hard" rows="7"></textarea>
<BR><INPUT TYPE="button" VALUE="CLEAR" onClick="document.aform.text1.value=''">
<INPUT TYPE="button" align="right" VALUE="ADD" onClick="window.opener.document.test.text.value=document.aform.text1.value;self.close()">
</BODY>
</FORM>
</CENTER>
</HTML>
thanks
i created an text field with image and submit button,the problem is when i click on edit.gif the form is submitting i dont understand why
the functionality of save button is workign on this image
<form NAME=test>
<input type="text" name="text" size="10">
<input type="image" src="../img/edit.gif" onClick="thew=window.open('window.html','newWin','width=200,height=150,top=400,left=600,dependent=yes,alwaysR aised=yes,resizable=no')" width="16" height="16" border="0" alt="Edit Text"></a>
<input type="button" class="button" value="Save" name="Save" border="1" onclick="go();">
</form>
<script language="JavaScript">
function go(){
document.test.submit();
}
</script>
this is window.html code
<HTML>
<head><title>edit</title></head>
<CENTER>
<FORM NAME=aform>
<BODY bgcolor="#FF9900" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
<textarea NAME=text1 wrap="hard" rows="7"></textarea>
<BR><INPUT TYPE="button" VALUE="CLEAR" onClick="document.aform.text1.value=''">
<INPUT TYPE="button" align="right" VALUE="ADD" onClick="window.opener.document.test.text.value=document.aform.text1.value;self.close()">
</BODY>
</FORM>
</CENTER>
</HTML>
thanks