Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 30th, 2004, 06:53 AM
Authorized User
 
Join Date: Sep 2004
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default Refreshing page loses content

Hi,

I'm populating a div using the innerHTML command, but when the page is refreshed, the content is lost, do you know how I can stop this?

Many thanks

 
Old November 30th, 2004, 07:09 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Not much you can do, scripted changes to the dom only affect the in memory object, they are not saved to the underlying file.
You have a number of options:
 
  • Stores changes made server side in a session variable or to a database.
  • Store changes made client side using a cookie if they are small or the user store if it's IE and the users allow this form of storage.
  • Use a frameset and store data in one frame which remains while the other changes

You are obviously going to have to keep track of whether changes need re-applying.
What exactly is your overall objective?



--

Joe (Microsoft MVP - XML)
 
Old November 30th, 2004, 08:39 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hii mattastic,

Hope this link help you alot!!!
Just copy and paste the code in order to see how it works :)

http://koders.com/javascript/fid3C57...494310387.aspx



Cheers :)

vinod





Similar Threads
Thread Thread Starter Forum Replies Last Post
safari for mac not refreshing content of page. toshi Javascript 0 December 19th, 2007 10:30 AM
Problem with iframe content when refreshing page klax Javascript 0 April 21st, 2007 04:43 PM
page not refreshing Bill Crawley ASP.NET 2.0 Basics 8 February 28th, 2007 11:39 AM
refreshing XML withour refreshing the page sasidhar79 XML 1 January 12th, 2005 05:16 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.