View previous topic :: View next topic |
Author |
Message |
cindyz
Joined: 05 Jul 2007 Posts: 2
|
Posted: Wed Jul 11, 2007 3:17 pm Post subject: How to submit selected dates to a parent window's list box? |
|
|
After selecting date(s) within calendar(Child) page, how to submit all selected dates to a parent window's list box?
Thanks,
|
|
Back to top |
|
 |
calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Wed Jul 11, 2007 3:59 pm Post subject: |
|
|
Take a look at the Fin445 demo for example. All you need is to create a script function in the parent window like following:
Code: | function fAddListItem(strDate) { // called by plugins1.js
var dl=document.getElementById("dateList");
dl.options[dl.options.length]=new Option(strDate);
} |
Then call it from within the fAfterSelected() in plugins.js:
Code: | function fAfterSelected(y,m,d,e) {
gContainer.fAddListItem(y+"-"+m+"-"+d);
} |
For Fin445 demo, we have pre-built fAddDate() in plugins.js to simplify the multi-select process.
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|
Back to top |
|
 |
calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Wed Jul 11, 2007 4:06 pm Post subject: |
|
|
To submit multiple dates to server end directly, you may read the comments in the MultiPicker demo, highlighted as following:
Quote: | To submit the selected dates to the server end, you could either Submit all dates individually by concatenate the dates in the list field and assign the result into a hidden form field;
Or, submit date ranges by utilizing the _pds array inside the plugin.
Please check out the submitByDates() and submitByRanges() javascript functions in this page. We also included 2 php source examples (ByDate.php and ByRange.php) for how to retrieve the submitted values in the server end. |
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|
Back to top |
|
 |
|