How to post data without page reload?

226 views
Skip to first unread message

Andrus Moor

unread,
Apr 19, 2004, 2:55:29 PM4/19/04
to
I want to send 10 KB data to server using HTTP POST method and receive
response
without refreshing current page.

The following code works OK in IE and Gecko browsers.

How to make it work in Opera ?

<span style="display:none">
<iframe name="jsrs1"></iframe></span>

<script>
var httpRequest;
if (typeof ActiveXObject != 'undefined') {
httpRequest = new ActiveXObject('Microsoft.XMLHTTP');
}
else if (typeof XMLHttpRequest != 'undefined')
httpRequest = new XMLHttpRequest();

function PostAndReceive(cURL,cPostKeys){
httpRequest.open("POST",cURL,false);
httpRequest.send(cPostKeys);
var container=window.frames['jsrs1'];
container.document.body.innerHTML='';
container.document.write(httpRequest.responseText);
container.document.close();
}
</script>


Tim Altman

unread,
Apr 20, 2004, 11:42:01 AM4/20/04
to
On Mon, 19 Apr 2004 21:55:29 +0300, "Andrus Moor" <nos...@no.ee>
wrote:

>I want to send 10 KB data to server using HTTP POST method and receive
>response
>without refreshing current page.
>
>The following code works OK in IE and Gecko browsers.
>
>How to make it work in Opera ?

There is currently no way of doing this in Opera.

--
Tim Altman
Customer Service
Opera Software

roy...@myrealSP-AMbox.com
No SP-AM is good spam.

Lee Harvey

unread,
Apr 20, 2004, 8:04:59 PM4/20/04
to
Andrus Moor wrote:
> I want to send 10 KB data to server using HTTP POST method and receive
> response without refreshing current page.
>
> The following code works OK in IE and Gecko browsers.
>
> How to make it work in Opera ?

It's possible.

However, to make your idea cross-browser compatible (non-ActiveX), you must
use a secondary [hidden?] DOM window object and JavaScript...

1) Use a [hidden?] frame or window.open() to gain access to a secondary DOM
window object.
2) The source of the secondary window should contain a <form>.
3) Use JavaScript to submit() the <form> contained in the secondary window.
4) The result of the HTTP POST should contain a window.onload event handler
informing the parent or opener window frameset of its result.
5) The main parent or opener window can respond accordingly.

NOTE: All source files mentioned above must be hosted from the same domain for
JavaScript security reasons.

HTH


Andrus Moor

unread,
Apr 22, 2004, 2:50:01 PM4/22/04
to
> 1) Use a [hidden?] frame or window.open() to gain access to a secondary
DOM
> window object.
> 2) The source of the secondary window should contain a <form>.
> 3) Use JavaScript to submit() the <form> contained in the secondary
window.
> 4) The result of the HTTP POST should contain a window.onload event
handler
> informing the parent or opener window frameset of its result.
> 5) The main parent or opener window can respond accordingly.

Lee, thank you.

I must re-design my whole web application for Opera for this.
I want some more information before staring major re-write.
Are you sure that this works reliably?
Can you give some URLs of web pages or applications which use this technique
?
This method requires popup windows.
Is it possible to dedect when the popup windows are disabled in browser and
give some message to user ?


Lee Harvey

unread,
Apr 22, 2004, 9:57:39 PM4/22/04
to
Andrus Moor wrote:
>> 1) Use a [hidden?] frame or window.open() to gain access to a
>> secondary DOM window object.
>> 2) The source of the secondary window should contain a <form>.
>> 3) Use JavaScript to submit() the <form> contained in the secondary
>> window. 4) The result of the HTTP POST should contain a
>> window.onload event handler informing the parent or opener window
>> frameset of its result. 5) The main parent or opener window can
>> respond accordingly.
>
> Lee, thank you.

No prob.


> I must re-design my whole web application for Opera for this.

The benefits outweight the risks, IMO. You'll get cross-browser
compatibility, more security (sans ActiveX requirement), and better
cross-platform support (since ActiveX is basically Windows-only).


> I want some more information before staring major re-write.
> Are you sure that this works reliably?

Looking at your requirements, this is probably how I would've tackled the
problem in the first place.


> Can you give some URLs of web pages or applications which use this
> technique ?

Sorry, I don't have any currently. However, I'm sure there's probably some
intranet code somewhere that has something similar... ;)

If you're interested, I remember seeing a similar topic discussed in the
comp.lang.javascript public newsgroup. Perhaps a google there might help
further.


> This method requires popup windows.

Not necessarily.


> Is it possible to dedect when the popup windows are disabled in
> browser and give some message to user ?

Personally, I would use an <iframe> to accomplish this
(hidden/small/offscreen/whatever). Then, reference window.parent from your
HTTP POST response page.

Basically, the src= of your <iframe> will specify an HTML page that contains a
<form> with method="POST". You will submit() the <form> using some JavaScript
inside the main (parent) document. As mentioned, the HTML result of POST-ing
the form should be a page containing a window.onload event handler that
informs its parent (or opener if you use a popup window) of the POST result --
do so by calling a parent/opener JavaScript function (test for existence
before doing so). At that point, your main (parent/opener) document will
receive the value of POST-ing data using a secondary window/document without
reloading itself.

Sound easy?

GL & HTH


Andrus Moor

unread,
Apr 23, 2004, 11:04:36 AM4/23/04
to
> Samples ?

>> Sorry, I don't have any currently. However, I'm sure there's probably
some
> intranet code somewhere that has something similar... ;)
>
>> If you're interested, I remember seeing a similar topic discussed in the
>> comp.lang.javascript public newsgroup. Perhaps a google there might help
>> further.

Can you give some more information how to search the comp.lang.javascript
newsgroup for this ?
Message dates or keywords ?
Maybe there are some javascript framework using this ?

It is interesting that I haven't seen this technique mentioned in a pages
which describe different methods
doing remote procedure calls from javascript. I don't know the reason why.

> > This method requires popup windows.
>
> Not necessarily.
>
>
> > Is it possible to dedect when the popup windows are disabled in
> > browser and give some message to user ?
>
> Personally, I would use an <iframe> to accomplish this
> (hidden/small/offscreen/whatever). Then, reference window.parent from
your
> HTTP POST response page.
> Basically, the src= of your <iframe> will specify an HTML page that
contains a
> <form> with method="POST". You will submit() the <form> using some
JavaScript
> inside the main (parent) document. As mentioned, the HTML result of
POST-ing
> the form should be a page containing a window.onload event handler that
> informs its parent (or opener if you use a popup window) of the POST
result --
> do so by calling a parent/opener JavaScript function (test for existence
> before doing so). At that point, your main (parent/opener) document will
> receive the value of POST-ing data using a secondary window/document
without
> reloading itself.

Posting from iframe refreshes always whole window.
Form cannot be posted in a way that result is send back to iframe.
Form's target attribute can only point to a window.

Window can be blocked by disabling popups in browser.
So <iframe> is not a solution.


Andrus.


Lee Harvey

unread,
Apr 23, 2004, 1:22:46 PM4/23/04
to
Andrus Moor wrote:
>> Samples ?
>>> Sorry, I don't have any currently. However, I'm sure there's
>>> probably
> some
>> intranet code somewhere that has something similar... ;)
>>
>>> If you're interested, I remember seeing a similar topic discussed
>>> in the comp.lang.javascript public newsgroup. Perhaps a google
>>> there might help further.
>
> Can you give some more information how to search the
> comp.lang.javascript newsgroup for this ?
> Message dates or keywords ?
> Maybe there are some javascript framework using this ?
>
> It is interesting that I haven't seen this technique mentioned in a
> pages which describe different methods
> doing remote procedure calls from javascript. I don't know the reason
> why.

Search Google groups for: "JavaScript submit iframe parent onload"

Here's a couple:
http://groups.google.com/groups?th=33f051968bba2ad6
http://groups.google.com/groups?th=25bcc79a602dc1af

>>> This method requires popup windows.
>>
>> Not necessarily.
>>
>>> Is it possible to dedect when the popup windows are disabled in
>>> browser and give some message to user ?
>>
>> Personally, I would use an <iframe> to accomplish this
>> (hidden/small/offscreen/whatever). Then, reference window.parent
>> from your HTTP POST response page.
>> Basically, the src= of your <iframe> will specify an HTML page that
>> contains a <form> with method="POST". You will submit() the <form>
>> using some JavaScript inside the main (parent) document. As
>> mentioned, the HTML result of POST-ing the form should be a page
>> containing a window.onload event handler that informs its parent (or
>> opener if you use a popup window) of the POST result -- do so by
>> calling a parent/opener JavaScript function (test for existence
>> before doing so). At that point, your main (parent/opener) document
>> will receive the value of POST-ing data using a secondary
>> window/document without reloading itself.
>
> Posting from iframe refreshes always whole window.

Not so (see below).


> Form cannot be posted in a way that result is send back to iframe.

Sure they can (see below).


> Form's target attribute can only point to a window.

Easy: don't specify a target! (see below)


> Window can be blocked by disabling popups in browser.

True.


> So <iframe> is not a solution.

False.


Here's a working example:
http://www.cros.net/rofkarins/parent.htm

This example:
- Displays a one-time message in the parent's window.onload event
- Submits a child form contained in an iframe without reloading the parent
- The child window informs its parent of the result via window.onload event
- The parent handles the result by displaying it in an alert dialog.

HTH


Andrus Moor

unread,
Apr 26, 2004, 1:40:41 PM4/26/04
to
I tried to implement post using your sample by the following code:

<html><head>
<script>function PostAndReceive(cURL,cPostKeys){
var f = window.frames.f;
var childF = f.document.forms.childF;
childF.action =cURL.replace(/\+/g,'%2B');
childF.xxxbuffer.value = cPostKeys.replace(/\+/g,'%2B');
childF.submit();
}
</head><body>
<span style="display:none">
<iframe name="f" src="/null.htm">
<form name="childF" method="post">
<input type="hidden" name="xxxbuffer"></form></iframe></span>
</body></html>


Unfortunately, Error: childF has no properties occurs at line

childF.action =cURL.replace(/\+/g,'%2B');

when calling PostAndReceive.

Any idea why ?


Lee Harvey

unread,
Apr 26, 2004, 4:30:11 PM4/26/04
to

Validate your code, and you'll see the errors:
http://validator.w3.org/

Most notably:
- End your script block with a </script>
- Place your <form name="childF"> inside /null.htm


Andrus Moor

unread,
Apr 27, 2004, 7:23:32 AM4/27/04
to

"Lee Harvey" <leeh...@grassyknoll.com> wrote in message
news:c6jrgc$10t$1...@mx1.opera.com...

Thank you.
I make some changes so that it works in IE.
However, this request is asynchronuous.

Request processing can take some time. During this, user can cause new
request to be sent.
This causes the response from previous request to be discarded and also
document.body is not an object error.

Is it possible to make synchrunous call: no input form user is accepted
until response is received. ?

My code:


function PostAndReceive(cURL,cPostKeys){

if (!httpRequest){
var f = window.frames.f;
f.document.body.innerHTML='';
f.document.write(
'<form name="childF" method="post"><input type="hidden"
name="xxxbuffer"></form>');
var childF=f.document.forms.childF;
childF.action=cURL.replace(/\+/g,'%2B')+SID;
childF.xxxbuffer.value=cPostKeys.replace(/\+/g,'%2B');
childF.submit();
return;
}


Lee Harvey

unread,
Apr 27, 2004, 11:06:04 AM4/27/04
to
Andrus Moor wrote:
> Thank you.
> I make some changes so that it works in IE.
> However, this request is asynchronuous.
>
> Request processing can take some time. During this, user can cause new
> request to be sent.
> This causes the response from previous request to be discarded and
> also document.body is not an object error.
>
> Is it possible to make synchrunous call: no input form user is
> accepted until response is received. ?

Doubtful. <shrug>

You might be able to use a pile of if/then logic to 'simulate' a synchronous
form submit/response behavior, but in reality, I don't think it's possible.

As far as automated form submission (not requiring user input), you've got a
few options there. Either: a) use a JavaScript timer (window.setTimeout) --
coupled with the boolean logic above -- to auto-submit the form on a periodic
basis; or b) use a <meta> "refresh" tag in your child HTML to GET new pages.

Personally, I'd avoid the lure of using pure client-side JavaScripting here.
In other words, toss-out your parent document.write() calls in favor of some
dynamically generated server-side script page (.ASP, .PHP, .PL, .MV,
.whatever) for the child. Overall, I think you'll have better control over
your testing/debugging environment, and will ease future maintenance efforts.

HTH


Andrus Moor

unread,
Apr 27, 2004, 11:43:56 AM4/27/04
to
> > Is it possible to make synchrunous call: no input form user is
> > accepted until response is received. ?
>
> Doubtful. <shrug>
>
> You might be able to use a pile of if/then logic to 'simulate' a
synchronous
> form submit/response behavior, but in reality, I don't think it's
possible.
>
> As far as automated form submission (not requiring user input), you've got
a
> few options there. Either: a) use a JavaScript timer
(window.setTimeout) --
> coupled with the boolean logic above -- to auto-submit the form on a
periodic
> basis; or b) use a <meta> "refresh" tag in your child HTML to GET new
pages.
>
> Personally, I'd avoid the lure of using pure client-side JavaScripting
here.
> In other words, toss-out your parent document.write() calls in favor of
some
> dynamically generated server-side script page (.ASP, .PHP, .PL, .MV,
> .whatever) for the child. Overall, I think you'll have better control
over
> your testing/debugging environment, and will ease future maintenance
efforts.

I have the following situation:

1. Users enters item code to invoice in IE/FireFox/Opera whatever.

2. In onblur event I make RPC to verify entry (I have 100000 items) using
PostAndReceive()

Problem: fast user can cause new RPC before response from a previous RPC is
received.
There are a lot of fields/buttons etc. which user can activate for a new
RPC.

I found that simplest way to solve this is to block user activity before
response is received.
IE/Mozilla XMLHTTP allows this.

How to solve this in Opera ?


Lee Harvey

unread,
Apr 27, 2004, 2:15:47 PM4/27/04
to
Andrus Moor wrote:
> I have the following situation:
>
> 1. Users enters item code to invoice in IE/FireFox/Opera whatever.
>
> 2. In onblur event I make RPC to verify entry (I have 100000 items)
> using PostAndReceive()
>
> Problem: fast user can cause new RPC before response from a previous
> RPC is received.
> There are a lot of fields/buttons etc. which user can activate for a
> new RPC.
>
> I found that simplest way to solve this is to block user activity
> before response is received.

Bingo (see below).


> How to solve this in Opera ?

The same.

Using JavaScript, temporarily disable all user input form
fields/functions/buttons/etc (with a global flag) while a request/response is
underway. Once the response has arrived, re-enable the form
fields/functions/buttons/etc. This will prevent 'quick' users from
'accidentally' posting multiple queries...but forces them to wait while this
'synchronous' behavior is being executed.

However, if you're forcing users to wait for a response (simulated syncronous
behavior) anyway, why not just have them submit a single form/page to begin
with? This would be the "simplest way" -- to borrow an expression.

Just my 2c. Good luck!


Andrus Moor

unread,
Apr 28, 2004, 12:08:43 PM4/28/04
to
> However, if you're forcing users to wait for a response (simulated
syncronous
> behavior) anyway, why not just have them submit a single form/page to
begin
> with? This would be the "simplest way" -- to borrow an expression.

I'm sorry, I don't understand this idea.

Create a single form, let users to input items without validation and
validate the whole data only after single submit, do you mean this ?

Andrus.


Lee Harvey

unread,
Apr 28, 2004, 3:44:59 PM4/28/04
to
Andrus Moor wrote:
>> However, if you're forcing users to wait for a response (simulated
>> syncronous behavior) anyway, why not just have them submit a single
>> form/page to begin with? This would be the "simplest way" -- to
>> borrow an expression.
>
> I'm sorry, I don't understand this idea.

I'm sure you do. Your grasp of HTML seems good.


> Create a single form, let users to input items without validation and
> validate the whole data only after single submit, do you mean this ?

Yes, pretty much straight HTML. However, use some simple client-side
JavaScript to pre-validate form fields before submission. Unfortunately, such
an ultra-simplified implementation doesn't really answer the question in your
"subject". Sorry.


Jan Egil Kristiansen

unread,
Apr 29, 2004, 5:58:21 AM4/29/04
to
If you can have your server respond to the POST with a "204 no content"
status code, the browser should not refresh the page.

Try the link from http://landsbank.fo/tools/nocontent/ to "nocontent.asp".

The 204 code is in this case a bug in IIS (the code should really have
been "5xx empty ASP file") But it is a 204, anyway, you're welcome to
test a POST against http://landsbank.fo/tools/nocontent/nocontent.asp.

A slight Opera 7.50 bug: The address field will change to
http://landsbank.fo/tools/nocontent/nocontent.asp

Andrus Moor

unread,
Apr 30, 2004, 9:35:27 AM4/30/04
to
I want data (javascript code) to get back as response.
How to get response data if server returns "no content" response ?


"Jan Egil Kristiansen" <no...@no.no> wrote in message
news:c6qjju$2r8$1...@mx1.opera.com...

Jan Egil Kristiansen

unread,
May 3, 2004, 8:14:39 AM5/3/04
to
Andrus Moor wrote:
> I want data (javascript code) to get back as response.
> How to get response data if server returns "no content" response ?

That's a problem, I think.
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.5 :
"The 204 response MUST NOT include a message-body"

Possible hack: place data in HTTP header field, e.g. X-andrus. But I
don't really think that's the way to go.

Andrus Moor

unread,
May 3, 2004, 10:54:56 AM5/3/04
to
I may have 100 kb response data.
Probably this is not allowed in header.

Popup windows can be disabled.
So the only way is to use iframe. Making synchrunous call using iframe
requires a lot of coding.

"Jan Egil Kristiansen" <no...@no.no> wrote in message

news:c75d3f$n92$1...@mx1.opera.com...

Rijk van Geijtenbeek

unread,
May 3, 2004, 2:28:32 PM5/3/04
to
On Mon, 19 Apr 2004 21:55:29 +0300, Andrus Moor <nos...@no.ee> wrote:

..

> httpRequest = new XMLHttpRequest();

..

We are currently looking into XMLHttpRequest. As GMail will be using this
(or ActiveX if you use MSIE), it would be nice if Opera supported this in
the not-too-distant future...

--
The Web is a procrastination apparatus: | Rijk van Geijtenbeek
It can absorb as much time as | Documentation & QA
is required to ensure that you | Opera Software ASA
won't get any real work done. - J.Nielsen | mailto:ri...@opera.com N

Andrus Moor

unread,
May 17, 2004, 10:32:11 AM5/17/04
to
> > httpRequest = new XMLHttpRequest();
>
> ..
>
> We are currently looking into XMLHttpRequest. As GMail will be using this
> (or ActiveX if you use MSIE), it would be nice if Opera supported this in
> the not-too-distant future...

What is release date of XMLHttpRequest-enabled Opera ?


Tim Altman

unread,
May 17, 2004, 3:41:06 PM5/17/04
to
On Mon, 17 May 2004 17:32:11 +0300, "Andrus Moor" <nos...@no.ee>
wrote:

>> > httpRequest = new XMLHttpRequest();

Generally speaking, we do not talk about release dates or feature
sets.

Mendrik

unread,
Jun 1, 2004, 12:59:07 PM6/1/04
to
"Rijk van Geijtenbeek" <ri...@opera.com> wrote in message news:<opr7fr9u...@news.opera.com>...

> We are currently looking into XMLHttpRequest. As GMail will be using this
> (or ActiveX if you use MSIE), it would be nice if Opera supported this in
> the not-too-distant future...

this isn't about posting, but the function load(url, tag|tagId) loads
the source from the given url. You can use GET to pass parameters.

for opera it falls back to lifeconnect (java required). I haven't
figured out if opera can do it otherwise, but IE doesnt use ActiveX
but the download behaviour.

Here we go:
<html XMLNS:IE>
<head>
<script language="Javascript">
function load(url, targetObj) {
if (typeof(targetObj) == "string") {targetObj =
document.getElementById(targetObj);}
if (typeof(download) != "undefined" &&
typeof(download.startDownload) != "undefined") {
loadIE(url, targetObj);
} else if (typeof(XMLHttpRequest) != "undefined") {
loadXML(url, targetObj);
} else {
loadJava(url, targetObj);
}
}

function loadJava(srcUrl, targetObj) {
var source = "";
var url = new java.net.URL(new
java.net.URL(window.location.href),srcUrl);
var stream = new java.io.DataInputStream(url.openStream());
var d = new java.io.BufferedReader(new
java.io.InputStreamReader(stream));
var line = "";
while ((line = d.readLine()) != null) {source += line + "\n";}
stream.close();
targetObj.innerHTML = source;
}

function loadXML(srcUrl, targetObj) {
var req = new XMLHttpRequest();
req.onreadystatechange = function() {
if (req.readyState == 4) {
if (req.status == 200) {
targetObj.innerHTML = req.responseText;
} else {
alert("no data");
}
}
};
req.open("GET", srcUrl, true);
req.send(null);
}

function loadIE(srcUrl, targetObj) {
var replaceContent = function(content)
{targetObj.innerHTML=content;};
download.startDownload(srcUrl, replaceContent);
}

</script>
<IE:DOWNLOAD ID="download" STYLE="behavior:url(#default#download)"/>
</head>


<body>
<div id="dl" style="border:1px solid
black;padding:10px;background:rgb(230,230,230)"></div>
<a href="javascript:load('load.html','dl')">bla</a>
</body>
</html>

put a load.html in the same location with any given content

Mendrik

unread,
Jun 2, 2004, 6:03:46 AM6/2/04
to
<html XMLNS:IE>
<head>
<script language="Javascript">
function load(url, targetObj) {
if (typeof(targetObj) == "string") {targetObj =
document.getElementById(targetObj);}
if (typeof(download) != "undefined" &&
typeof(download.startDownload) != "undefined") {
loadIE(url, targetObj);
} else if (typeof(XMLHttpRequest) != "undefined") {
loadXML(url, targetObj);
} else if (navigator.javaEnabled()) {
loadJava(url, targetObj);
} else {
loadFrame(url, targetObj);
}
}

function loadFrame(url, targetObj) {
var iframe = document.createElement("IFRAME");
iframe.style.border="none";
iframe.style.width="0px";
iframe.style.height="0px";
iframe.style.visbility="hidden";
document.body.appendChild(iframe);
iframe.src = url;
iframe.onload = function() {
targetObj.innerHTML = iframe.document.body.innerHTML;
document.body.removeChild(iframe);
};
}

function loadJava(srcUrl, targetObj) {
var source = "";
var url = new java.net.URL(new
java.net.URL(window.location.href),srcUrl);
var stream = new java.io.DataInputStream(url.openStream());

var line = "";
while ((line = stream.readLine()) != null) {

alright, works in opera with disabled java too :D

Andrew Gregory

unread,
Jun 5, 2004, 1:30:45 AM6/5/04
to
On 2 Jun 2004 03:03:46 -0700, Mendrik <men...@gmx.de> wrote:

[lots of yummy Javascript snipped]

I've reworked that script (see
<http://www.scss.com.au/scripts/loadelement.js>). I also have some
questions:

1. Does this provide the functionality GMail requires? If so, then that
would imply GMail could be made fully compatible with Opera *now*, right?
2. Are there advantages to using the different methods (MS download
object, Gecko XMLHttpRequest, Java, IFRAME)? It appears to me that the
IFRAME method works in all browsers, is quite fast, and cleans up after
itself very nicely.

--
Andrew Gregory
<URL: http://www.scss.com.au/family/andrew/ >

Mendrik

unread,
Jun 14, 2004, 12:15:32 PM6/14/04
to
> 1. Does this provide the functionality GMail requires? If so, then that
> would imply GMail could be made fully compatible with Opera *now*, right?
> 2. Are there advantages to using the different methods (MS download
> object, Gecko XMLHttpRequest, Java, IFRAME)? It appears to me that the
> IFRAME method works in all browsers, is quite fast, and cleans up after
> itself very nicely.

Oh nice work. Well I'm not familar with gMail. But the iframe has one
disadventage. I couldnt apply display:none to it (onload didn't work
anymore), so it could affect some flicker effect (even tho it's very
small). but opera needed it that way. i would first test it with
multiple loading calls. like 10 links that request different parts at
once.
i have no experience on how stable the iframe loading is. i know for
sure, that the IE download thingie works rock solid on newer IE
versions. Ive heard tho, that there have been some memory issues in
IE5.0 or 5.5.
The quesion is if DOM/js can handle a lot of asychronous calls that
way.

good luck
mendrik

Andrew Gregory

unread,
Jun 16, 2004, 4:31:25 AM6/16/04
to
On 14 Jun 2004 09:15:32 -0700, Mendrik <men...@gmx.de> wrote:

> Oh nice work. Well I'm not familar with gMail. But the iframe has one
> disadventage. I couldnt apply display:none to it (onload didn't work
> anymore), so it could affect some flicker effect (even tho it's very
> small).

The visibility:hidden seems to work. If you're worried about the page
reflowing as IFRAMEs are added and removed, then using absolute
positioning to take them out of the flow should resolve that. (I've
updated my copy of the script to do that)

> i would first test it withmultiple loading calls. like 10 links that
> request different parts atonce.

I've just tested loading five local pages into separate divs. I could tell
the loading was occurring asynchronously, and all five loaded just fine.

Now, if only I had a use for this tool! :-D

Reply all
Reply to author
Forward
0 new messages