Click to See Complete Forum and Search --> : session variable


RJ2003
01-14-2004, 08:20 AM
I am trying to develop a demo version of our system with ONLY HTML pages and without any
JSP, Java or webserver. Its a demo version to show the screen flows. Now, screen 1 takes user inputs
and screen 3 and other successive screens depend on some of user's inputs in screen 1.
This is done using session variables in the actual system but how do I do the same in my
static HTML pages using Javascript ?

Ideally, I would like to store all user inputs of each screens and pass on to all sucessive screens
and access them from there.

Khalid Ali
01-14-2004, 08:28 AM
you are moving from a better solution to a "Not better solution"

If you must then you can use 3 ways to get this done.

1. append the first forms data to the url and parse the url at the other end to display it as you wish.

2. Use cookies to store data and retrieve it on other pages(very little data can be stored 4k in IE)

3. Make the next screens children of the parent form page then you can transfer all the data to children

Fang
01-14-2004, 08:38 AM
4. Persisting Session Information (http://msdn.microsoft.com/library/default.asp?url=/workshop/author/persistence/overview.asp) (IE only)

RJ2003
01-14-2004, 09:02 AM
Thanks Khalid.

3. Make the next screens children of the parent form page then you can transfer all the data to children

This looks a better solution in my case. Being a starter, could you send me some code example of :
a) how to set next screens children of the parent form
b) how to store all form data in an object in the parent form
c) how to enable passing around of this data obejct
d) how to retrieve data from this data object

thanks again.

Khalid Ali
01-14-2004, 09:09 AM
As a matter of fact this resource does exactly that (http://www.webapplikations.com/pages/html_js/window/DataTransferToChildFromParentWin.html)
You can implement it for as many children as you wish

RJ2003
01-14-2004, 09:28 AM
"append the first forms data to the url and parse the url at the other end to display it as you wish. "


How do u do this ?
How do you append the url with the form data ? Code sample would be helpful.

Thanks.

RJ2003
01-14-2004, 09:38 AM
I have a form and I need to collect some form data and append to a href link (in the same page) like <a href="next screen.html?key1=val1&key2=val2"> NEXT STEP </a>

RJ2003
01-14-2004, 09:48 AM
Anybody ???

Khalid ??

Khalid Ali
01-14-2004, 10:20 AM
Originally posted by RJ2003
Thanks Khalid.

3. Make the next screens children of the parent form page then you can transfer all the data to children

This looks a better solution in my case. Being a starter, could you send me some code example of :

thanks again.

I have posted a link above

RJ2003
01-14-2004, 10:25 AM
I am actually looking at this option u suggested:

"append the first forms data to the url and parse the url at the other end to display it as you wish. "

How do u collect the form data and append to the URL associated to a hyperlink in the same page ?

Webskater
01-14-2004, 11:41 AM
This is so obvious I must be missing something but here goes. You say you want pages without java, jsp or webserver. Where are you going to host your pages if you do not have a webserver? How are you going to resolve where the links go if you do not have a webserver? Are you just using hyperlinks to point to files on a local machine? If you are I cannot see how you extract the value pairs from a URL.
If you just want to show the flow, why not pre-populate everything?