Solved

submit and reset as images in a form, how?

Posted on 1999-01-14
8
190 Views
Last Modified: 2010-04-09
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
0
Comment
Question by:glenramsey
  • 3
  • 2
  • 2
  • +1
8 Comments
 

Expert Comment

by:jrsjr
ID: 1841683
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
 
LVL 4

Expert Comment

by:martinag
ID: 1841684
 <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
 

Author Comment

by:glenramsey
ID: 1841685
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
 
LVL 6

Expert Comment

by:PBall
ID: 1841686
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

Author Comment

by:glenramsey
ID: 1841687
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
 
LVL 4

Expert Comment

by:martinag
ID: 1841688
> 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
 

Author Comment

by:glenramsey
ID: 1841689
:-)
oh how i love the internet
thanks for all your responses anyway, looks like i'll have to do without
0
 
LVL 6

Accepted Solution

by:
PBall earned 0 total points
ID: 1841690
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

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now