Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating info from server without reloading page

Status
Not open for further replies.

Maccaday

Technical User
Dec 9, 2003
71
GB
Hi,

I'm wondering if it's possible to update information with data that is only held on the server, without reloading the page.

By this, I mean that some information is presented on the page when it initially loads, then when a user clicks on a part of the screen to see more information, then a request for just that additional information is made, and once received, is loaded into the page.

I am trying to write a site which features information that is presented in a tree-diagram for ease of browsing. However, the amount of information available will probably venture into Mb, so it would be better if the user only needed to download information that they wanted to view. For speed and usability of browsing, though, I would prefer to not have to reload the page each time the user wanted to change the view of the page.

Would it be possible to store all the information in separate files (e.g. Javascript of text files), and when certain information was needed, to send a request for those files, and then to load that information into the page?

Any help with this would be very gratefully received.

Thanks.
 
The web page on the client's computer has no connection to the server unless the page is submitted back to the server. If you want to update without reloading, I'd suggest using in iframe with a separate page displayed and reload that portion of the page when different data is requested.

The only way I know of to keep the connection to the server is with a Java applet.

Lee
 
Thanks Lee.

Since I can't load new information just into the page without reloading the page (be it the whole page or an iFrame), is it possible to load a lot of text information into a page after everything else has loaded (without using iFrames or popups)?

By this I mean I'd like to be able to load a number of javascript files with all the information the user might want to see displayed in arrays. However, so as not to alter the user's usage of the page, it would be better to load this information in the background after everything else has loaded. Is it possible to link/load files at the end of an HTML file that load after everything else has loaded, or is it only possible in the header section (which will download them before the main body of the HTML file)?

Thanks.
 
You could load a variety of <div>s with different sets of information, and then display whichever one was desired at any time.

Lee
 
That's a possibility, though doesn't the whole of the HTML part of a page need to download before things like images? I will have a number of images that will always be viewable, but a lot of text (possibly hundreds of Kb or Mb of info) that won't always be viewable. I would rather not have to load all the text before the images if possible.

I think that the safest bet, considering that I want the page to be viewable on as many browsers as possible (including those that don't have Javascript enabled) would be for me just to reload the page each time. Since it is the images that will require the most time to download, if they are cached by the browser, then it should be a fairly quick process on the client's side.

Thanks for your responses.

Marcus.
 


There is remote scripting I've have used in the pass with ASP and it worked very nice and I read somewhere that is remote scription to use with JSP

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top