/    Sign up×
Community /Pin to ProfileBookmark

Submit buttons

Hi,

I’ve created a submit button that is actually an image. I need the button to change to another image when the user clicks it (It will change from an image saying “submit” to an image saying “please wait”). I’m doing this to try and stop people continually clicking the submit button.

I’ve found some code that will change the value on a submit button when someone clicks it.

[CODE]<INPUT TYPE=”SUBMIT” CLASS=”FormButton” VALUE=”Login >>>” NAME=”InputSubmit” onClick=”this.value=’Please Wait…’; this.className=’FormButtonClicked'”>[/CODE]

This links to a CSS file that changes the appearance of the button.

However, this doesn’t apply to images but just the standard HTML buttons.

Does anyone know if its possible to do something like this for images?

Thanks

Scouse

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@requestcodeJun 11.2004 — I wonder if using a regular image link would do the trick.

<a href="#" onClick="document.form_name.submit();document.subm.src='plwait.gif'"><img src="submit.gif" name="subm" border="0"></a>
×

Success!

Help @scouse spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...