• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HTML - JavaScript : Retain values in html pages

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I have to design a prototype which contains 6 pages. I have designed them in html. Its a workflow which moves from page 1 to page 6.
Now the requirement is , I make entries and move from page 1 to apage 6.

1. Incase I come back to page 2 from page 3 onclick of back button, Page 2 has to retain all the vakues that i have typed before.
2. Page 6 must display all the values that i have entered in the form from page 1.

I cannot connect to database as its just a prototype demo to the client.

One suggestion I got was to write index.html, which loads page 1.
In Index.html, have 6 different div tags which calls each page on click of next button and hides the other div.

So I am clear about it. Can someone suggest any idea for this asap.

Sample code will be more helpful.
 
Bartender
Posts: 543
4
Netbeans IDE Redhat Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can save them in a cookie. Though I don't really see why you can't use the server, whether you can access the database or not.
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I doubt this is related to the JEA exam/assignment. Moving.
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You did not mention what your backend is using. If Servlets/JSP you can store values in the session. Alternatively, if all you care about is modern HTML5-capable browsers, then you can use JavaScript local storage.
 
Dhivya Krishnan
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply. I dont want to use any session or any db servers. It was just a prototype I was designing.

I could do it using JQuery and in the same html page having different div element.
 
Bear Bibeault
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, so where's your code using that approach? What problems are you having with it?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic