homerUK
05-15-2003, 12:44 PM
Hey,
I checked the search, but couldnt find this solution...
I have a submit button, and a "normal" button (type="button") for use on a form... when the Submit button is pressed, it calls an event to check the form (validation) then submit it. Next to that, I have a button which is used to cancel the form. ie: when the user clicks "cancel" it moves them to another page.
This code works:
<input type="button" value="cancel" onClick="ask()">
but i tried to use this with an image....
<input type="image" src="x.gif" alt="cancel" onClick="ask()">
The image button does ask the user if they want to cancel, but if they select yes or no, it still submits the form. Basically, my question is how to I make that image work as a basic button, NOT a submit button. I guess I could move it outside the form... but I'd rather not......
any help will be much appreciated.....
thanks...
I checked the search, but couldnt find this solution...
I have a submit button, and a "normal" button (type="button") for use on a form... when the Submit button is pressed, it calls an event to check the form (validation) then submit it. Next to that, I have a button which is used to cancel the form. ie: when the user clicks "cancel" it moves them to another page.
This code works:
<input type="button" value="cancel" onClick="ask()">
but i tried to use this with an image....
<input type="image" src="x.gif" alt="cancel" onClick="ask()">
The image button does ask the user if they want to cancel, but if they select yes or no, it still submits the form. Basically, my question is how to I make that image work as a basic button, NOT a submit button. I guess I could move it outside the form... but I'd rather not......
any help will be much appreciated.....
thanks...