José María Tristán wrote:
Again, very thanks
I think that the second option es better that our needs.
When the uses press teh button "search" a pop-up it's open. This pop-up
contains the list whith the employers and a "close" button. The fist windows
is always visible and it's possible to interact whith the controls. When the
user close the pop-up i like show in the first windows the selection.
I don't know how I can use javascript to capture the dates in the pop-up and
show in the firs window when the user press "close".
Here's what I do (or did, only did this kind of thing once for a proof
of concept :)
1) In the main window, create a form to manage the state of the child
(popup) window:
<form name="childForm">
<input type="hidden" name="childClosed" value="false" />
<input type="hidden" name="date" value="" />
</form>
2) In the main window, add a listener to the <body> tag to listen for
focus events:
<body onfocus=onFocusBody()">
3) In the main window, write the function to take action when the child
is closed:
<script type="text/javascript">
function onFocusBody() {
if ( document.childForm.childClosed.value == "true" ) {
document.childForm.childClosed.value = "false"; // Indicate that
we noticed the child was closed
// Update your document structure here using
'document.childForm.date.value'
// .....
}
}
</script>
4) In the child window, add an event for the close button that copies
the date value to the main window before closing:
<button onclick="onButtonClose()">Close</button>
5) And write the function in the child window:
<script type="text/javascript">
function onButtonClose() {
window.opener.document.childForm.childClosed.value = "true"; //
Indicate to parent that the child's no longer open
window.opener.document.childForm.date.value = myDateForm.date.value;
// Copy from child to parent
window.close();
}
</script>
Have fun,
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]