Re: Simultaneous post/get?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;">

I'll investigate your suggestion to look into iframes.

Ignore that. An iframe is not the best way to solve this.

-Stut

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux