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. :)

6 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!!

. said...

酒店經紀PRETTY GIRL 台北酒店經紀人 ,禮服店 酒店兼差PRETTY GIRL酒店公關 酒店小姐 彩色爆米花酒店兼職,酒店工作 彩色爆米花酒店經紀, 酒店上班,酒店工作 PRETTY GIRL酒店喝酒酒店上班 彩色爆米花台北酒店酒店小姐 PRETTY GIRL酒店上班酒店打工PRETTY GIRL酒店打工酒店經紀 彩色爆米花