Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pass a value from one window to another window

Status
Not open for further replies.

hungnguyen

Programmer
Sep 22, 2000
43
US
Hi all,

I have a question. I have a webpage containing 3 pages: main page, contents pages, and header page. In the contents page, there are buttons; in the main page, there is a form to filled out. My problem is here: I open the form and enter information and there is a field in the form needs to be calulate in specific way. Therefore, I create a button to pop a new window for calculation. I do the calculation then press the button <Total> in the window to get back to the form. However, those information I entered has been cleared. Is there any way to prevent it??
Thanks for your help.
bye
Hung Nguyen
 
Instead of poping up a new window you should submit your form with a different action. How could you do that? Using JavaScript. When you press the button it should run a JavaScript script that change the action and submit the form.
Then in calculation windows you should set all submitted variables as hidden inputs. Now this form must call the previous window and all data is saved (you have access to all information filled previously).
This is the algorithm if you need code call me back.

Regards,
Luís Silva
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top