PDA

View Full Version : Replacement Reset Button Problem


culprit
06-19-2002, 09:37 AM
I've made a new buton set for my vbulletin and extended it to include various form buttons throughout the forum, just to keep the look flowing.

While replacing submit buttons works fine, when I replace any type of reset button the button then submits the form instead of clearing the form fields. I'm using standard HTML conventions for the replacement but with no joy.

I'd also like to replace the 'Change Avatar' button but can't se how to make that work as its button type needs to be 'file' and cannot be change to image. Any ideas on that one?

Anyway here is the code for an example reset button:

Original:
<input type="reset" class="bginput" name="Reset" value="Reset Fields">

Image Replacement:
<input type="image" src="{imagesfolder}/resetfields.gif" name="Reset" value="Reset">

Any help greatly appreciated. Cheers.

Admin
06-19-2002, 10:19 AM
You can add this:
onClick="FORMNAME.reset();"
To the image-button, but it won't work because the FORMNAME needs to be adjusted to each form in vBulletin.
Maybe you can use this though, I'm not sure...

plattopus
06-19-2002, 10:24 AM
The type="reset" is the key part of the tag, and when you replace it with "image" I don't think it's possible to still have it reset.

culprit
06-19-2002, 11:00 AM
The onClick action doesn't work, unfortunately. The form is still submitted but I get a 404 error. But you expected that.

Plattopus maybe right.

It looks like it can't be done :(

This is a real pity. It prevents creating a complete style for full integration.

Nevermind, I can dream can't I?

Thanks for the speedy responses.