image is submitting form

liunx

Guest
hi,<br />
<br />
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<br />
<br />
the functionality of save button is workign on this image <br />
<br />
<br />
<br />
<form NAME=test><br />
<input type="text" name="text" size="10"> <br />
<input type="image" src=http://www.webdeveloper.com/forum/archive/index.php/"../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><br />
<input type="button" class="button" value="Save" name="Save" border="1" onclick="go();"><br />
</form><br />
<script language="JavaScript"><br />
function go(){<br />
document.test.submit();<br />
}<br />
</script><br />
<br />
this is window.html code<br />
<br />
<HTML><br />
<head><title>edit</title></head><br />
<CENTER><br />
<FORM NAME=aform><br />
<BODY bgcolor="#FF9900" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0"><br />
<textarea NAME=text1 wrap="hard" rows="7"></textarea><br />
<BR><INPUT TYPE="button" VALUE="CLEAR" onClick="document.aform.text1.value=''"><br />
<INPUT TYPE="button" align="right" VALUE="ADD" onClick="window.opener.document.test.text.value=document.aform.text1.value;self.close()"><br />
</BODY><br />
</FORM><br />
</CENTER><br />
</HTML><br />
<br />
thanks<!--content-->Replace <input type="image"<br />
with <img src=http://www.webdeveloper.com/forum/archive/index.php/<!--content-->thanks alot its appreciable<!--content-->No problem ;)<!--content-->
 
Back
Top