Custom Submit and Clear Button using form

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
chriscrooz
Forum Newbie
Posts: 2
Joined: Sat May 05, 2007 3:36 pm

Custom Submit and Clear Button using form

Post by chriscrooz »

I'm using a form for my contact page which is linked to a PHP page to send the mail. I'd really like to create a custom submit and clear button for my html page which I think I read requres using a Image Widget but for some reason it doesn't function. Do I need to add a variable to the PHP so it will work? here's the code on the HTML code embedded in a FORM TAG

Code: Select all

<INPUT name="reset" TYPE="image" SRC="images/clear_btn.gif" CLASS=contactTitle2 STYLE="border: 1px solid #333333;"  VALUE="Clear">
<INPUT name="submit" SRC="images/submit_btn.gif" TYPE="image" CLASS=contactTitle2 STYLE="border: 1px solid #333333;" VALUE="Send">
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Custom Submit and Clear Button using form

Post by califdon »

chriscrooz wrote:I'm using a form for my contact page which is linked to a PHP page to send the mail. I'd really like to create a custom submit and clear button for my html page which I think I read requres using a Image Widget but for some reason it doesn't function. Do I need to add a variable to the PHP so it will work? here's the code on the HTML code embedded in a FORM TAG

Code: Select all

<INPUT name="reset" TYPE="image" SRC="images/clear_btn.gif" CLASS=contactTitle2 STYLE="border: 1px solid #333333;"  VALUE="Clear">
<INPUT name="submit" SRC="images/submit_btn.gif" TYPE="image" CLASS=contactTitle2 STYLE="border: 1px solid #333333;" VALUE="Send">
You don't have any event code to make them do whatever you want them to do. The standard Submit and Reset TYPES have that code built into them, but when you want a custom image, you have to use TYPE=image, so you lose the built-in functionality. You will have to add an OnClick attribute calling some Javascript code to do that.
Post Reply