CalendarXP.net Support Forum Index CalendarXP.net Support
Most forums here are private and invisible to public.
 
 FAQFAQ   SearchSearch   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to submit selected dates to a parent window's list box?

 
Post new topic   Reply to topic    CalendarXP.net Support Forum Index -> FlatCalendarXP Related
View previous topic :: View next topic  
Author Message
cindyz



Joined: 05 Jul 2007
Posts: 2

PostPosted: Wed Jul 11, 2007 3:17 pm    Post subject: How to submit selected dates to a parent window's list box? Reply with quote

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
View user's profile Send private message
calendarxp
Site Admin


Joined: 30 Jan 2005
Posts: 409

PostPosted: Wed Jul 11, 2007 3:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
calendarxp
Site Admin


Joined: 30 Jan 2005
Posts: 409

PostPosted: Wed Jul 11, 2007 4:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    CalendarXP.net Support Forum Index -> FlatCalendarXP Related All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Copyright 2003- Idemfactor Solutions, Inc. All rights reserved.
Powered by phpBB © 2001, 2005 phpBB Group