[ 2 posts ]

Terry Bankert

  • Username: tbankert
  • Joined: Fri Jun 11, 2010 12:25 pm
  • Posts: 10
  • Offline
  • Profile

Button State

Post Posted: Thu Dec 01, 2011 9:43 am
+0-
I'm working on a multiple upload interface for an opensource project called RAILO it's an open source CFML engine, and I'm building in the functionality for the tag CFFILEUPLOAD the Adobe implementation is in Flash, but I'm using the yui upload control and some various other yui components. essentially what i have is a YUI button for adding files.

YAHOO.railo.cffileupload.addbtn = new YAHOO.widget.Button("cffileupload-add", { onclick: { fn: YAHOO.railo.cffileupload.addfile } });

I've created the uploader as a transparent layer over the top of the button, and added listeners to the rollover and rollout of the uploader however, I can't seem to find in the button documentation the easiest way to change the state of the button so that the proper styles are applied when I roll over the flash component.

I've tried the following with no luck in my handleRollOver event.
YAHOO.railo.cffileupload.addbtn.addClass("yui-button-hover");
YAHOO.railo.cffileupload.addbtn.addClass("yui-push-button-hover");

Terry Bankert

  • Username: tbankert
  • Joined: Fri Jun 11, 2010 12:25 pm
  • Posts: 10
  • Offline
  • Profile
Tags:

Re: Button State

Post Posted: Thu Dec 01, 2011 10:10 am
+0-
Never mind figured it out if anyone else has this problem look at these two methods:

addStateCSSClasses("hover")
removeStateCSSClasses("hover")

just call your button in the rollover event listener
button.addStateCSSClasses("hover")
rollout event listener
button.removeStateCSSClasses("hover")
  [ 2 posts ]
Display posts from previous:  Sort by  
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