submit and reset as images in a form, how?

without using javascript?

as far as i can see it's impossible.  sure, having a submit alone as an image works, but when you want a reset too - there's just know way i can see to do it!

glen@perfectday.com
glenramseyAsked:
Who is Participating?
 
PBallConnect With a Mentor Commented:
Use CSS, overlay the reset button on top of the reset image and make reset button transparent (hmm..if that is even possible hehe, hmm..I think it can't be done tho, anyway...).
0
 
jrsjrCommented:
so you are saying you don't want to use the buttons that a form provides but you want to use images with no javascript?
0
 
martinagCommented:
 <INPUT TYPE="IMAGE" SRC="...">
will create an image that submits the form.

However, to reset you *have* to use JavaScript:
  <A HREF="javascript:document.formName.reset()"><IMG SRC="..." BORDER="0"></A>

Martin
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
glenramseyAuthor Commented:
cheers anyway - i knew that reset with an image can be done using js, erm, doesn't my original question state _without_ using js? :-*
0
 
PBallCommented:
I am not sure if this is going to work but using CSS, you can alter the look of a button, hmm.. can it be of transparent background and no border..hmm..

but the theory is to put the image in a lower z-index than the button so the button is actually overlaying the image.  if you can make a transparent button with the dimension of the image, there you go.

0
 
glenramseyAuthor Commented:
that's probably the best idea yet, hence it doesn't use js :-)

our clients specs are no js you see, but another spec is version 4 browsers only (128 bit encryption req) - so maybe css is the way to go - seems a bit iffy tho', a bit of a work around, at the moment i've specified that we are unable to have a reset images button and therefore told them they can't have one

bloody stupid if you ask me, not using js (reason: firewall/content filter corporate hooha)

fwiw, if it's not an insult, PBall, i'd like to "award" the 5 to you

cheers

~glenramsey
glen@perfectday.com
0
 
martinagCommented:
> doesn't my original question state _without_ using js? :-*
Indeed. That's what made me say
> to reset you *have* to use JavaScript

Martin
0
 
glenramseyAuthor Commented:
:-)
oh how i love the internet
thanks for all your responses anyway, looks like i'll have to do without
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.