Whenever I use this tab script with firefox I lose the ability to click on a form field and see the cursor blinking in the field. It only works for the last tab in the set. If I start typing I'm in that form element and it get's filled out fine, there's just no cursor indication - which is anoying. Anybody got a clue why? Heres the code (from cross-browser.com)...
Code:function xTabPanelGroupEditor(id, w, h, th, clsTP, clsTG, clsTD, clsTS,initialTab) // object prototype { var panelGrp = xGetElementById(id); if (!panelGrp) { return null; } var panels = xGetElementsByClassName(clsTP, panelGrp); var tabs = xGetElementsByClassName(clsTD, panelGrp); var tabGrp = xGetElementsByClassName(clsTG, panelGrp); if (!panels || !tabs || !tabGrp || panels.length != tabs.length || tabGrp.length != 1) { return null; } var selectedIndex = 0, highZ, x = 0, i; var pgw = xWidth(panelGrp); var pgh = xClientHeight() - 120; xHeight(panelGrp,pgh); xResizeTo(panelGrp, pgw, pgh); xResizeTo(tabGrp[0], w, th); xMoveTo(tabGrp[0], 0, 0); w -= 2; // remove border widths var tw = 100; for (i = 0; i < tabs.length; ++i) { xResizeTo(tabs[i], tw, th); xMoveTo(tabs[i], x, 0); x += tw; tabs[i].xTabIndex = i; tabs[i].onclick = tabOnClick; xHeight(panels[i],pgh - th - 2); //new xMoveTo(panels[i], 0, th); } highZ = i; tabs[initialTab-1].onclick(); function tabOnClick() { tabs[selectedIndex].className = clsTD; this.className = clsTS; xZIndex(this, highZ++); xZIndex(panels[this.xTabIndex], highZ++); for (i = 0; i < tabs.length; ++i) {//PW: fix IE window objects ignoring zIndex xHide(panels[i]); } xShow(panels[this.xTabIndex]); selectedIndex = this.xTabIndex; } this.onUnload = function() { for (var i = 0; i < tabs.length; ++i) {tabs[i].onclick = null;} } }






Bookmarks