05 December 2007

How to setting focus to a Tab?

There are many discusses in CRM Forum, about how to setting focus to a Tab?
For example, I want the default tab1Tab to be the default tab when I open a record.

So if you put this code in onLoad() event:

document.getElementById('tab1Tab').focus();

It doesn't work as you expected.

But, if you use:

crmForm.all.tab1Tab.click();

It will work like a dream. :)

5 comments:

Anonymous said...

As you do to put the focus on the tab, i would like to put the focus on a field when the tab is selected.
Any idea how to do it?

Anonymous said...

Simple & beuatifull))

Anonymous said...

Just doesn't work in CRM 4.0 ...

Anonymous said...

Thank you very much!!!

Urix

Anonymous said...

Hello,
I want to simulate adding a note manually using Javascript. I know the link name of "Click here to add a note", it's newNoteButton but I don't know how to execute this.

document.getElementById('newNoteButton').click() doesn't work.

Help me!!