Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 04-02-2007, 11:17 PM   #1 (permalink)
hc69
Recruit
 
Join Date: Apr 2007
Posts: 1
hc69 is on a distinguished road
Ajax Application that saves state ...

Hey guys,

I am new here and have a question ...

I am trying to create an Ajax Application that saves the last state ... now I know the Ajax "back button" problem is well known, but what I am looking to do is not create a history of all the states just the last state.

an example of this being done is believe it or not at ebaumsworld ... EBAUMSWORLD - Funny Pictures, Hilarious Videos, Flash Games and Jokes

clicking on the above link will take you to the site, now click on one of the page numbers for the video, say "5", the ajax then loads videos from page "5", now go to a different page, either click on a video or go to your homepage, then hit back and the page is still at "5" hit back again and you are back to your orginal page before ebaumsworld...

how can I do this? i have everything working but if i click on the "5" page leave my application and go back, it is at page "1" instead of "5"...

thanks in advance for you help...

- jake
hc69 is offline   Reply With Quote
Old 04-03-2007, 12:02 AM   #2 (permalink)
teknomage1
Jack of all trades
 
teknomage1's Avatar
 
Join Date: Feb 2005
Location: Los Angeles
Posts: 598
teknomage1 is on a distinguished road
Send a message via AIM to teknomage1
Depending on the complexity of your application you have a number of choices
  • Store the State of the Application in hidden forms
  • Store the State in a Database
  • Store the State in the URL
  • Store the State in a Server Side Continuation
Most of those are differnt ways of saying the same thing though. Basically the web server has to have some way to relate the user's GET or POST request to some stored data on the server to allow it to "remember" where the user left off.

If you were going to use a database, you might store an identifier for the session in a cookie, then use that identifier as a key in a database row where you store the other variables your application needs to track.

Of course eventually you have to get rid of all those stored sessions in your database. You can't always depend on users to log out but your application shouldn't just wipe a user's session while they're browsing!
__________________
Stop intellectual property from infringing on me
teknomage1 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Log4j created file not able to delete while testing my application?? j.gohel Java 12 04-07-2006 10:52 AM
Filling out default info on form via Ajax wzeller HTML, XML, Javascript, AJAX 5 03-05-2006 05:26 PM
AJAX n00b (Pretty involved issue, here!) l33t_1-1axx0r HTML, XML, Javascript, AJAX 4 02-23-2006 09:35 AM
downloading the java sdk without the sun application server? sde Java 2 08-02-2004 07:53 AM
What makes a network application? sde Program Design and Methods 3 08-03-2003 05:19 PM


All times are GMT -8. The time now is 08:07 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting