View Full Version : html to html

10-30-2009, 06:39 AM

how to pass the values or any messages from html page to another html page with javascript that value shoul be printed in that another page
plz help me out if any one knows

10-30-2009, 09:50 AM
Have a look at using cookies for this

10-30-2009, 10:28 AM
You can use:

1. Cookies as forum_amnesiac suggested. But this has an issue. The user may disabled cookie in his or her browser. In such a case the whole thing fails. The target page will never get the values from the source page.

2. You can pass the values as a part of the url. For eg: assume that you have placed the link to the target page in the following manner:

<a href="target.htm?value1=1000&value2=Test">Target Page</a>

So Whenever you click on this link two values will be transferred to the target page. From that page using JS you can extract the value.

3. Client-side storage like the one provided by YUI (http://developer.yahoo.com/yui/storage/) can be used.

Hope this helps