calendarxp Site Admin
Joined: 30 Jan 2005 Posts: 409
|
Posted: Tue Feb 15, 2005 7:22 pm Post subject: [FlatCalendarXP]How to display all events of the selected date in a new page? |
|
|
Taking the MockupSibling as an example:
1st, in plugins_s.js set the fAfterSelect() as following:
Code: | function fAfterSelect(y,m,d,e){
popup("showOneDay.htm","_blank");
} |
2nd, create a blank html file named as "showOneDay.htm".
3rd, put the following into the <body> of the newly created html file:
Code: | <script>
var sd=opener.gfFlat_s.gdSelect;
var htm="Selected Date is: "+sd+"<BR>";
htm+="Events:<BR>";
var evt=opener.gfFlat_s.fGetEvent(sd[0],sd[1],sd[2]);
htm+=evt==null?"No events.":evt[6];
document.write(htm);
document.close();
</script> |
That's all. Now click on the small calendar for a test. Of course you may give it a much better looking.
Note: This only works if you popup a new browser window to show the events. If you want to replace the contents of the current window, then replace the above scripts with the following:
Code: | <script>
var sd=opener.gfFlat_s.gdSelect;
var htm="Selected Date is: "+sd+"<BR>";
htm+="Events:<BR>";
var evt=opener.gfFlat_s.fGetEvent(sd[0],sd[1],sd[2]);
htm+=evt==null?"No events.":evt[6];
opener.document.write(htm);
opener.document.close();
opener.focus();
self.close();
</script> |
_________________ Copyright 2003-2011 Idemfactor Solutions, Inc. All rights reserved. |
|