Re: Simultaneous post/get?
| From: | Stut | Date: | Sun, 11 Jun 2006 16:46:43 +0000 |
| Subject: | Re: Simultaneous post/get? | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-237765@lists.php.net to get a copy of this message | ||
tedd wrote:
At 4:35 PM +0100 6/11/06, Stut wrote:There is no need to hit the server for this. Simply include "display: none;" in the style for either the img tag or the div containing it so it's not shown when the page initially loads. In the onsubmit for the form change that display to 'block' to show the image. This also avoids the need to postpone posting the form since the image has already loaded. Image... <img id="waitimg" src="/whatever.gif" style="display: none;" /> Form... <form ... onsubmit="document.getElementById('waitimg').style.display = 'block'; return true;">The form, with onsubmit="return sndReq()". sndReq does the AJAX image thing (although I don't know why you're using AJAX here,I'm using ajax because it's a method to inject an image in a DOM div without having to reload the current page. All I want to do is present an image during the "wait". Is there an easier way to do this?
I'll investigate your suggestion to look into iframes.Ignore that. An iframe is not the best way to solve this. -Stut