View previous topic :: View next topic |
Author |
Message |
jmoran
Joined: 10 Apr 2006 Posts: 16
|
Posted: Tue Nov 14, 2006 9:13 pm Post subject: Passing in another value to plugins |
|
|
Hi -
I have an array of text fields that are indexed and I need to launch a calendar per index. When I choose a date range I need to know what index (set) of text fields I need to update in the parent. How can I do this?????
|
|
Back to top |
|
|
calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Tue Nov 14, 2006 10:12 pm Post subject: |
|
|
You may set a global variable in-page and code the calendar page to read it via window.opener.
e.g.
Code: | <script>
var popfield=null;
function popUp(field) {
popfield=field;
var myWin = window.open("calendar.html");
myWin.opener = window;
}</script>
<form name="myForm">
<input name="abc[1]" onclick="popUp(myForm.elements['abc[1]'])">
<input name="abc[2]" onclick="popUp(myForm.elements['abc[2]'])">
</form>
|
and then in the calendar.html you may access the popfield via window.opener.popfield if in-page or gContainer.opener.popfield if in plugins.js.
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|
Back to top |
|
|
jmoran
Joined: 10 Apr 2006 Posts: 16
|
Posted: Wed Nov 15, 2006 5:40 pm Post subject: |
|
|
Thank you....Thank you.....Thank you.......
It worked like a charm.
|
|
Back to top |
|
|
|