Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 30th, 2004, 06:53 AM
Authorized User
 
Join Date: Sep 2004
Location: , , .
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

Reply With Quote
  #2 (permalink)  
Old November 30th, 2004, 07:09 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
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)
Reply With Quote
  #3 (permalink)  
Old November 30th, 2004, 08:39 AM
Friend of Wrox
 
Join Date: Oct 2004
Location: delhi, delhi, India.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 08:26 AM.


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