How do I flag an error message on a Submit button?
Hi there
Apologies if this is a really basic question but my knowledge of Javascript extends to copying bits and pieces off pages and amending for my needs! I'm a total newbie i'm afraid.
So, can anyone help me with the following problem.
I have an Ordering page that submits info to a database on clicking a Submit button. As there is a lot of data to be passed to the database, it sometimes takes a while before submitting and moving to a Thank You page. We are noticing that people are obviously thinking that the button's not working, and clicking on it again. This obviously submits the info again and causes multiple entries in the database.
I would like to be able to have an alert box pop up if the user clicks on the submit button for a 2nd time i.e. they click on submit, think nothing's happening, click on it again, message pops up saying 'currently processing order', data isn't submitted for a second time. Once first data has submitted successfully, page changes to Thank You page.
Any ideas?
I suppose another way of doing this would be to 'hide' the button once it had been clicked, and 'show' a message to say 'processing order, please wait' but I don't know how I would do this either!
Again, any ideas?
Thanks in advance
Lucy
|