简体   繁体   中英

Left to Right Tab index in Javascript for Dynamics CRM 2013

I have applied below javascript for left to right tab index in Dynamics CRM 2013 in Web resource , which works for IE but does not work for Chrome and Firefox.

function TabOrderLefttoRight() {
   for(var i = 0; i < Xrm.Page.ui.controls.getLength(); i++) 
   {  
       var element = Xrm.Page.ui.controls.get(i);
        if (element.tabIndex && element.tabIndex != "0") {
            if (element.className == 'ms-crm-Hidden-NoBehavior') 
                continue;
            if (element.tagName == 'A') {
                if (element.className != 'ms-crm-InlineTabHeaderText') 
                    continue;
            }
           element.tabIndex = 1000 + (i * 10);
        }
    }
}

Please help.

Thank You.

this works in Chrome

function TabOrderLefttoRight() {
for (var i = 0; i < Xrm.Page.ui.controls.getLength() ; i++) {
    var control = Xrm.Page.ui.controls.get(i);
    var element = document.getElementById(control.getName());

    if (element.tabIndex && element.tabIndex != "0") {
        if (element.className == 'ms-crm-Hidden-NoBehavior')
            continue;
        if (element.tagName == 'A') {
            if (element.className != 'ms-crm-InlineTabHeaderText')
                continue;
        }
        element.tabIndex = 1000 + (i * 10);
    }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM