Help with code for a better clear form button

  MS35 17:36 19 Jul 2007

I've created an input form on a webpage in dreamweaver and have put on a button on to clear the form.

The first buutton was very simple, looked terrible, but worked.

input name="Reset" type="Reset"
value="Clear Form" />

the second looked better (in my view) but doesn't do anything.

object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="click here" width="100" height="22">
param name="movie" value="Clear Form.swf" />
param name="quality" value="high" />
embed src="Clear Form.swf" quality="high" pluginspage="click here" type="application/x-shockwave-flash" width="100" height="22" > /embed>

I tried using the code from the first in the source code for the second but still couldn't get it to work.

I'm sure this must be simple, but what do I need to do to the second set of code to make it do the same as the first?

Apologies if I've overcomplicated this but this is my first venture into web design.


  benjiboots 20:45 19 Jul 2007

Your second button doesn't work because it is a Flash button and it's quite complicated to get Flash/swf files embedded in web pages to communicate with HTML aspects of the page.

My recommendation would be to create an image of the button that you want to use (eg. jpg or gif) and then use the first lot of code. If you are using Dreamweaver it is relatively straightforward to use an image as a button in a form.
Hope that helps :)

  MS35 22:09 19 Jul 2007

I've now got a new image which looks ok (not as good as the flash but i can work on that!)

But, How do I add the code:

input name="Reset" type="Reset"
value="Clear Form" />

to the image line:

<img src="ClearForm.gif" width="101" height="21" />


  IntoPCs 23:20 19 Jul 2007

but why do we have buttons to clear a form? If you make an error you correct it if you don't you click submit (or post response) and an action takes place.
I don't think I have ever used the clear button on a form, but they seem to be on every form you see - am I missing something?

  benjiboots 15:35 22 Jul 2007

Here's a whole load of information about using images as buttons in a form field:
click here
It also goes into IntoPCs subject as to why we should have a reset button in the first place.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Alienware 17 R4 2017 review

These brilliant Lego posters show just what children's imaginations are capable of

Mac power user tips and hidden tricks

Comment réinitialiser votre PC, ordinateur portable ou tablette Windows ?