Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Subject: On closing of modal calendar [SOLVED]
ScotDiddle
Member

Posts: 24
Registered: 11/28/2007
Location: Richmond, VA
Member Is Offline
posted on 6/19/2008 at 05:47 PM Reply With Quote
Subject: On closing of modal calendar [SOLVED]


tharrison:

On a hijacked thread over on the Pro Version fourm : input color field ( http://www.softcomplex.com/forum/viewthread_4636/ ) Tigra Admin pointed me in the right direction...

First, I wrote a custom function in calendar.js that allowed me to determine that 'this.TC0p.id' is the name of the div which holds the calendar elements ( add : alert(A_CALENDARS[n].TC0p.id); in your " for (var n = 0; n < A_CALENDARS.length; n++) { " init function to see it in action ).

Next, I had to write a function in my HTML page which is triggered during the ' onChange= ' function of my select list which allows the users to hide one div, and display another...

Vis: onChange="closeCalendars();"

Where the function is defined as follows:

Code:

// Called from around line 201 in UIControl.php for the singleDate / dateRange <select... onChange= > Directive...
function closeCalendars() {
for (var n = 0; n < A_CALENDARS.length; n++) {
if (A_CALENDARS[n].TC0p.style.visibility == 'visible') {
// OR if (A_CALENDARS[n].TC3b) { // Thanks Tigra Admin
// Defunct: My Lame Attempt...
// A_CALENDARS[n].showcal(); // Turn off the no_cal.gif Icon
// A_CALENDARS[n].showcal(); // Hide the calendar

A_CALENDARS[n].TC0x.src=A_CALENDARS[n].TCK.caliconshow.src; // Thanks Tigra Admin
// A_CALENDARS[n].TC0x.src=A_CALENDARS[n].TCK.caliconhide.src; // To show Icon with "close me" "X"
}
}
}



The double call to showcal() is a little messy, but it works... Without it, the calendar will become hidden, but the "X" ( ' click me to close ' Icon) remains... Probably a way around this, but I couldn't find it.)

[edit]

Solution supplied by Tigra Admin on the Pro board, under the "Input Field Color" thread :

// Turn off the "no_cal.gif" Icon

A_CALENDARS[n].src=A_CALENDARS[n].TCK.caliconshow.src; // Thanks Tigra Admin

[/edit]

And there you have it...

I have, at times, 27 calendar to choose from, and two sets of select drop-downs that cause divs to hide or appear... I just added the onChange= to all of these <select statements, and all of my testing has returned the results that we are after...

That is, any calendar left open by the user goes away.

The fun takes place in the calendar.js funciton called: TC00 ...

I did a global change in my calendar.js file of 'TC00' to 'showHideCal' .

Scot L. Diddle, Richmond VA
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Free Download Free Download
Product Documentation Documentation
Support Forum Support Forum
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004