473,386 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Preserve Data Values

Page A is an input data page. Before all the data input is complete, a user
might have to call an intermediate page B. After completing page B, page B
will return the user to A. The problem. The values entered on page before
the user called page B, are lost. I "think" I read somewhere that to
preserve the values, I save use Cookies.

Is that correct? Is there any other way?

Thanks....

Bruce
Aug 8 '08 #1
4 1929
On Aug 8, 11:20*am, "Bruce A. Julseth" <julebj_nos...@bellsouth.net>
wrote:
Page A is an input data page. Before all the data input is complete, a user
might have to call an intermediate page B. After completing page B, page B
will return the user to A. The problem. The values entered on page before
the user called page B, are lost. I "think" I read somewhere that to
preserve the values, I save use Cookies.

Is that correct?
You could save data in a cookie, then re-establish it when the user
returns to the page however it is not particularly robust.

Is there any other way?
You can manage the session at the server so that when the form is
submitted in the first place, the server remembers the values and re-
populates the form when the user returns.

You can also submit the values to the second form and keep them in
hidden fields, then submit them again when you return to the first
form.

You could make use of the new features of HTML 5 and use a client-side
database - available in Safari 3.1 and Gecko 1.9 (Fx 3.0?):

<URL: http://www.w3.org/html/wg/html5/#sql >
--
Rob
Aug 8 '08 #2
Yeah send them in the URL and use JavaScript to pick off the query
string.

OR

Cheat and store the values in window.name;

PAGE A.html
<script ...>
window.name="HELLO FROM A";
</script>

PAGE B.html
<script ...>
alert(window.name); //produces 'HELLO FROM A'
</script>
Aug 8 '08 #3

"RobG" <rg***@iinet.net.auwrote in message
news:86**********************************@t1g2000p ra.googlegroups.com...
On Aug 8, 11:20 am, "Bruce A. Julseth" <julebj_nos...@bellsouth.net>
wrote:
Page A is an input data page. Before all the data input is complete, a
user
might have to call an intermediate page B. After completing page B, page B
will return the user to A. The problem. The values entered on page before
the user called page B, are lost. I "think" I read somewhere that to
preserve the values, I save use Cookies.

Is that correct?
You could save data in a cookie, then re-establish it when the user
returns to the page however it is not particularly robust.

Is there any other way?
You can manage the session at the server so that when the form is
submitted in the first place, the server remembers the values and re-
populates the form when the user returns.

You can also submit the values to the second form and keep them in
hidden fields, then submit them again when you return to the first
form.

You could make use of the new features of HTML 5 and use a client-side
database - available in Safari 3.1 and Gecko 1.9 (Fx 3.0?):

<URL: http://www.w3.org/html/wg/html5/#sql >
--
Rob

I like both your suggestions. I know how to do the second suggestion, hidden
fields. The first one I'm not sure how to do it, off the top of my head. I
am using PHP on the serverside. so I guess I need to get the form fields to
some $_SESSION vars?

Thenks...

Bruce
Aug 8 '08 #4

"Laser Lips" <lo*********@gmail.comwrote in message
news:df**********************************@d77g2000 hsb.googlegroups.com...
Yeah send them in the URL and use JavaScript to pick off the query
string.

OR

Cheat and store the values in window.name;

PAGE A.html
<script ...>
window.name="HELLO FROM A";
</script>

PAGE B.html
<script ...>
alert(window.name); //produces 'HELLO FROM A'
</script>
Sneaky!! I think I'll look at Rob's approach first.

Thanks for the response.

Bruce
Aug 8 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: | last post by:
Is it correct to think that after reducing the populated array's size from say, 10 to 5 with redim preserve myArray(i) an attempt to access an element above the fifth does not cause a...
0
by: Jan Keller | last post by:
Hello all, I am using an XmlTextReader and a DataSet to populate a DataGrid: ds = New DataSet xr = New XmlTextReader(path) ds.ReadXml(xr) xr.Close() dv = New DataView(ds.Tables.Item(0))
2
by: Strahimir Antoljak | last post by:
When a user types in values in last row of DataGrid, new row is automatically added below. In certain cases I would like to preserve constant number of rows and prevent a new row to be...
6
by: Mark | last post by:
In a specification I'm designing, I'd like to specify that the order of Names (IDs) in an attribute value of datatype IDREFS is significant. My question is if most real-world XML parsers...
23
by: Bjorn | last post by:
Hi. Every time i post data in a form the contents are being checked for validity. When i click the back-button, all data is gone and i have to retype it. It's obvious that only a few or none of...
4
by: Bosconian | last post by:
I have created a form tool page that consists of several dropdowns which allows a user to drill down and select a desired document for viewing in an external window. I need to post the form data to...
6
by: lucyh3h | last post by:
Hi, In one of my pages, I use javascript (AJAX) to populate one mulitple select field based on user's click event on another control. I noticed that when I navigate back to this page by clicking...
2
by: doomer | last post by:
Hello, I'm trying to build a set of classes that act as the handlers for a simple expression parser, and i'm wondering how to preserve the dynamic type information from derived classes. An...
4
by: GatorKnight904 | last post by:
Does anyone know how to preserve data after Server.Transfer is used? What is happening is: I am using the Server.Transfer method to send a 3 values from page 1 to page 2 on a website. Then a...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.