PDA

View Full Version : Activate Event Firing



timw
6 Apr 2010, 12:28 PM
I have a tabpanel setup with the necessary event handlers. When I select a specified tab, the user goes to the page correctly by navigating to the site by using code in the event handler that caught the activate event.

This new page is a list elements. The user selects one of these elements and is brought to a new page to edit/view the element details.

The tab is still active from step 1.

Is it possible, to click the already active tab and have the activate event fire again?

Currently, in my application the activate event does not fire when an active tab element
is already active.

Is there any way around this?

thanks in advance for any advice.

TRW

timw
7 Apr 2010, 8:18 AM
Hello, I have been playing a bit with this.

I added this bit of code which does add the click
event handler for catching a mouse click on a tab object.

Ext.get('myTabs').on('click', handleClick);

My handler is now where I am having an issue.

I tried this for an handler function.

function handleClick(evt) {
alert("Click Event Caught!!! " + evt.target);
}

The evt is empty.

I don't see much in the way of documentation on catching click events.

Is here a place where I can see what arguments are passed and what
I have available for data?

My apologies if these questions are too basic. I am a newbie and just
got into this bit of code.

Thanks

TRW

timw
7 Apr 2010, 1:02 PM
I've found some info but I am having no luck with this.

I have the following code in my webpage:

Ext.get('tabs1').on('click', handleClick);


function handleClick(e, t) {
e.preventDefault();

alert("Click Event Caught!!! ID= " + t.id);
}

The ID comes back as undefined. I've tried using other properties from
the EventObject an HTMLElement. All the results are no data.

Am I missing something else to wire the click event with by Tab elements?

thanks...hopefully there is an answer out ther...much appreciated!

TRW

Animal
7 Apr 2010, 1:08 PM
do not use alert.

Debug properly.