Click to See Complete Forum and Search --> : passing values


chuxs
12-03-2003, 04:57 AM
I have two html pages namely

htmlA
htmlB

both having form tags and two textboxes. pls hw do i pass the values of my 2 textboxes in htmlA to the other 2 textboxes in htmlB

Gollum
12-03-2003, 05:00 AM
This is most probably a server-side issue.
When a form is submitted, the values of the text boxes are posted (usually) to the server. The server can then use those values in any way it likes - including using them to format the values of other text boxes on other pages. For more information please refer to the server-side scripting forum of your choice :cool:

chuxs
12-03-2003, 05:18 AM
not really. am actually calling a popup function on click of a button in htmlA to display my htmlB page and pass the values to the other textbox in htmlB not submit to the server

Gollum
12-03-2003, 05:43 AM
OK,

well, once the popup window document has loaded you can access the form elements just like the main window. The trick is knowing when the document has loaded.

Probably the easiest way is to modify your htmlB code to fetch them from its opener...

<script>
function fetchValues()
{
// assuming a form called 'f' on this page and the opener
document.f.textbox1.value = window.opener.document.f.textbox1.value;
...
}
</script>

...

<body onload="fetchValues();">

chuxs
12-03-2003, 07:46 AM
thanx

Gollum
12-03-2003, 08:15 AM
No problem