faqts : Computers : Programming : Languages : JavaScript : Forms : image buttons

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

6 of 14 people (43%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

How do I strip the x=?? and y=?? from a form posted with an image submit?

Feb 4th, 2004 14:53
Chris Seeberger, Stuart Middleton,


Create a JS method which disables the Image Button on Submit:

<script language="JavaScript" type="text/javascript">
<!--
function disableSubmitImage() {
 if(document.getElementById("SubmitImage")){
   document.getElementById("SubmitImage").disabled = "true";
   }
}
//-->
</script>

<form action="#URL#" method="get" name="Form"
onSubmit="disableSubmitImage()">
    <input type="Image" src="#URL#" name="SubmitImage">
</form>