Answered TabIndex

  • Tuesday, April 08, 2008 8:22 PM
     
     

     

    How do you set the tab index on the field of a form? For some reason when pressing the tab key, it isn't defaulting "left to right".

All Replies

  • Wednesday, April 09, 2008 12:31 AM
     
     Answered

    Hi.

     

    The following code will re-arange the tabindex sequence in a left to right order.

     

    function OnCrmPageLoad()

    {
         ReArangeTabIndex();
    }

     

    function ReArangeTabIndex()

    {

        for( var i = 0 ; i < crmForm.all.length ; i++ )

        {

              if( crmForm.all[ i ].tabIndex )

                  crmForm.all[ i ].tabIndex = 1000 + (i*10);

        }
    }

     

    OnCrmPageLoad();

     

    Cheers,

    Adi

  • Wednesday, April 09, 2008 12:54 PM
    Moderator
     
     

    crmForm.all.new_field.TabIndex=11;

     

    for more see javascript in crm sdk

     

    http://www.microsoft.com/downloads/details.aspx?FamilyID=82E632A7-FAF9-41E0-8EC1-A2662AAE9DFB&displaylang=en

     

    Regards,

    Imran

    http://microsoftcrm3.blogspot.com

     

  • Monday, June 30, 2008 3:56 PM
     
     
    This code works great.  Additonal info:  it needs to be placed in the OnLoad event of the form.  Thanks for your help (and I did check "this post was helpful")!

     

  • Thursday, August 14, 2008 12:06 AM
     
     

    Seems to work great except it gets "stuck" on lookup / relationship fields.

     

    That is I can table from firstname to lastname, etc but when I get to owner it won't tab past it.

     

    Thoughts?