On Jun 11, 2006, at 2:02 PM, tedd wrote:
At 5:46 PM +0100 6/11/06, Stut wrote:
tedd wrote:
At 4:35 PM +0100 6/11/06, Stut wrote:
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?
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;">
Bingo!
That works slick ! While I *think* I know css, it would have taken me
a long while before I would have turned to css to solve this.
I recall trying this (exactly this I think) a couple months ago and
finding that it works in most browsers, but not in Windows IE6 (of
course). Is it working in Windows IE6 for you?
I got a working upload progress bar by using Uber Uploader
<http://sourceforge.net/projects/uber-uploader>.
--
Lowell Allen
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php