471,594 Members | 2,644 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,594 software developers and data experts.

fetching 2nd page in the back

MD
When displaying the metadata for our system, takes about 5 seconds to
display
10 results to the browser. The whole process works like this.
1. Call the servlet from the javascript with Dom
var dom = new ActiveXObject( "Msxml2.DOMDocument" );
dom.async = false;
dom.load("/servlet/GetSearchResult?start=0&num=10");

2. parse this dom to display in the table.

Once we have the xml in the dom takes less than seconds to display in the
table.
But the problem is when getting the search result from the server. In order
to
at least looks faster we want to fetch the result for the second page after
getting
the result for the first page. I want to hide the 2 nd page search result
behind
until a user clicks on 2 nd page button. when this user gose to the 2 nd
page
I start fetching the search result for the 3 page. Can this be done with
Javascript?

Thanks in advance.

D

Sep 11 '06 #1
1 1264

MD wrote:
When displaying the metadata for our system, takes about 5 seconds to
display
10 results to the browser. The whole process works like this.
1. Call the servlet from the javascript with Dom
var dom = new ActiveXObject( "Msxml2.DOMDocument" );
dom.async = false;
dom.load("/servlet/GetSearchResult?start=0&num=10");

2. parse this dom to display in the table.

Once we have the xml in the dom takes less than seconds to display in the
table.
But the problem is when getting the search result from the server. In order
to
at least looks faster we want to fetch the result for the second page after
getting
the result for the first page. I want to hide the 2 nd page search result
behind
until a user clicks on 2 nd page button. when this user gose to the 2 nd
page
I start fetching the search result for the 3 page. Can this be done with
Javascript?
Sure, look into XmlHttpRequest. It can work in the background while
you're doing other stuff.

To tell you the truth I would have had the first 10 load this way as
well....
>
Thanks in advance.

D
Sep 12 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Andres Baravalle | last post: by
5 posts views Thread by David Jacques | last post: by
22 posts views Thread by Sandman | last post: by
7 posts views Thread by John Nagle | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by Anwar ali | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.