Ajax preloader image
Basically the user submits an identity number which is sent to another php file for verification, and the result is displayed without refreshing the page.
For this I came accross this Ajax code:
Here is the form code:
<form id="ValidationForm" onsubmit="return submitForm();">
<input type="text" name="number">
<input type="Submit" value="Verify">
How can I amend the above code to have a preloader image (or text) shown while the user waits for the result?
Help will be greatly appreciated.
this assumes your loading image or container element has a class of loaderimg
- also this only happens upon a successful ajax request, you should also consider using the error: setting as well - if you havent already ofc ourse
Solution was relative simple, but since I didn't know better, you directed me in the right direction.
I added a div with the loader image in the container element, and made it not visible:
And it works perfect!
|All times are GMT +1. The time now is 02:35 AM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.