I have both a specific and a general question for the group.

Specific question:  Anyone know how to use the underlying Ext lib to 
register events?  My goal is to register the same events for all tabs. The 
events will change the color of the tab text onmouseover and change it 
back onmouseout.  So far, I've had partial success in registering an event 
for one tab as shown below.  In this proof-of-concept exercise, I was 
hoping that the called functions, 'doOnmouseover ' and 'doOnmouseout' 
would know which tab was being acted on, and I could say something like 
"this.el.dom.firstChild.firstChild.firstChild.style.color = 'black';" 
While the events get registered properly,  I had to hard code the 
reference to a tab to get it to work. 

In general, I've had to do a lot of digging to get this far.  For example, 
it took half a day for me to find 
"indexTab.el.dom.firstChild.firstChild.firstChild.style.color " is the way 
to access the text color of a tab.  Which leads to my general question: 
What is the best JS library to use for tabs?  jQuery and jQuery UI?  What 
are people using?  And if I decide to stay with cflayout and the Ext lib, 
are there some tutorials or groups that would help me?  Many thanks.

<cflayout name="catalogSearch" type="Tab">
<cflayoutarea name="catalog" title="Catalog Search">
        [Catalog Search code]
 
</cflayoutarea>

<cflayoutarea name="index" title="Index Search">
        [Index Search code]
</cflayoutarea>

</cflayout>
<cfset ajaxOnLoad("setup")>



function setup(){ 
                        var mytabs = 
ColdFusion.Layout.getTabLayout('catalogSearch');
                        var indexTab = mytabs.getTab("index");

                        indexTab.el.on({
                                 'mouseover': {
                                fn : doOnmouseover,
                                scope: this
                                },
                                 'mouseout': {
                                fn : doOnmouseout,
                                scope: this
                                } 
                        });
                }
 
                doOnmouseover = function(){
                        var mytabs = 
ColdFusion.Layout.getTabLayout('catalogSearch');
                        var indexTab = mytabs.getTab("index");
 indexTab.el.dom.firstChild.firstChild.firstChild.style.color = 'black';
                } 
 
                doOnmouseout = function(){
                        var mytabs = 
ColdFusion.Layout.getTabLayout('catalogSearch');
                        var indexTab = mytabs.getTab("index");
 indexTab.el.dom.firstChild.firstChild.firstChild.style.color = 'gray';  
                }

______________________________________________________________________
Ed Szwedo
Web Development Team Lead
CSC

109 TW Alexander Drive, Building NCC, Mail Drop N176-05, Research Triangle 
Park, NC 27711
Information Technology Infrastructure Solutions | Office: (919)541-3955 | 
Fax: (919)541-3641 | szwedo...@epa.gov | www.csc.com 


-------------------------------------------------------------
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------

Reply via email to