Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
05-03-2012, 12:11 PM #1
- Join Date
- Mar 2012
- Thanked 0 Times in 0 Posts
Swap button for loading image (Ajax)
When performing an Ajax request I want to change the submit button into a loading image and then swop it back again when the Ajax request is complete.
I don't want a loading image anywhere else as on mobile phones it can't always be seen due to small screen size.
I have grabbed the event (which references the form, is that right?) and I have something like this:
<button type="submit" name="name_can_vary">Search</button> event.name_can_vary.style.visibility = 'hidden'; //(obviously this isn't complete code but no doubt explains what I am talking about)
Thanks for any help.