can anyone help me with a code that I can use in a html form.. when we click submit a image appear on the page with a loading gif file while the html goes to the post response page.
can anyone help me with a code that I can use in a html form.. when we click submit a image appear on the page with a loading gif file while the html goes to the post response page.
When a form is submitted, the action of the form is like a link-- the browser goes there, and it also sends the data to that page.
So the page that loads and the page that gets the data must be the same.
You can try to work around this a few ways:
1. You could use frames, and submit the data to an iframe/frame on your page while the main page does a loading gif.
2. You could just have a loading gif for a few seconds (5?) until it submits the form (delay the form submission and open the gif with Javascript).
3. You could use Ajax or another similar method to submit the form in the background and stay on the same page, while loading a gif.
Also, you could actually make the second page yourself, with a loading gif or whatever you want, and program that page (with PHP, etc.) to accept the data.
For a more specific answer, you need to explain a little more about what you want to do, give an example, or pick one of the options above.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
help?
bump..
[Spam, deleted]
Last edited by djr33; 10-07-2009 at 01:17 AM.
Have a look at this link, it shows how to display an image on form submission.
http://www.mollerus.net/tom/blog/200...rance_aft.html
Don't know if that's what you're looking for?
Use a script like one of the many incarnations of "lightbox" and display a loading gif. Trigger this event on form submission with a 5 second delay until the next page loads.
The link above looks helpful too.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
could it be something like this in Submit button
and this in jsCode:rel="lightbox" onclick="showLoading(this);"
Code:function showLoading(button) { one = new Image ( ); one.src = "loading1.gif"; button.style.color = '#676561'; wait(400); // Else the form will submit before the background image changes return true; }
i know this is wrong but there might be a correction and it will work
Bookmarks