Buenas tardes, estuve intentando múltiples opciones para lograr la aceptación de este código por parte de IExplorer pero no logro cargarlo sin errores.
El código es:
var YtableEmulator1=document.getElementById('y-table-emulator1');var table1=document.getElementById('table-body1');YtableEmulator1.style.height=table1.client Height===0?"330px":table1.clientHeight+"px";var scrollablePanel1=document.getElementById('scroll1' );var headerContainer1=document.getElementById('header-container1');var YfakeScrollablePanel1=document.getElementById('y-fake-scroll1');YfakeScrollablePanel1.style.top=headerCo ntainer1.clientHeight===0?"34px":headerContainer1. clientHeight+"px";YfakeScrollablePanel1.onscroll=f unction(ytab1){scrollablePanel1.scrollTop=YfakeScr ollablePanel1.scrollTop;};
var YtableEmulator2=document.getElementById('y-table-emulator2');var table2=document.getElementById('table-body2');YtableEmulator2.style.height=table2.client Height===0?"330px":table2.clientHeight+"px";var scrollablePanel2=document.getElementById('scroll2' );var headerContainer2=document.getElementById('header-container2');var YfakeScrollablePanel2=document.getElementById('y-fake-scroll2');YfakeScrollablePanel2.style.top=headerCo ntainer2.clientHeight===0?"34px":headerContainer2. clientHeight+"px";YfakeScrollablePanel2.onscroll=f unction(ytab2){scrollablePanel2.scrollTop=YfakeScr ollablePanel2.scrollTop;};
var YtableEmulator3=document.getElementById('y-table-emulator3');var table3=document.getElementById('table-body3');YtableEmulator3.style.height=table3.client Height===0?"330px":table3.clientHeight+"px";var scrollablePanel3=document.getElementById('scroll3' );var headerContainer3=document.getElementById('header-container3');var YfakeScrollablePanel3=document.getElementById('y-fake-scroll3');YfakeScrollablePanel3.style.top=headerCo ntainer3.clientHeight===0?"34px":headerContainer3. clientHeight+"px";YfakeScrollablePanel3.onscroll=f unction(ytab3){scrollablePanel3.scrollTop=YfakeScr ollablePanel3.scrollTop;};
var YtableEmulator4=document.getElementById('y-table-emulator4');var table4=document.getElementById('table-body4');YtableEmulator4.style.height=table4.client Height===0?"330px":table4.clientHeight+"px";var scrollablePanel4=document.getElementById('scroll4' );var headerContainer4=document.getElementById('header-container4');var YfakeScrollablePanel4=document.getElementById('y-fake-scroll4');YfakeScrollablePanel4.style.top=headerCo ntainer4.clientHeight===0?"34px":headerContainer4. clientHeight+"px";YfakeScrollablePanel4.onscroll=f unction(ytab4){scrollablePanel4.scrollTop=YfakeScr ollablePanel4.scrollTop;};
var YtableEmulator5=document.getElementById('y-table-emulator5');var table5=document.getElementById('table-body5');YtableEmulator5.style.height=table5.client Height===0?"330px":table5.clientHeight+"px";var scrollablePanel5=document.getElementById('scroll5' );var headerContainer5=document.getElementById('header-container5');var YfakeScrollablePanel5=document.getElementById('y-fake-scroll5');YfakeScrollablePanel5.style.top=headerCo ntainer5.clientHeight===0?"34px":headerContainer5. clientHeight+"px";YfakeScrollablePanel5.onscroll=f unction(ytab5){scrollablePanel5.scrollTop=YfakeScr ollablePanel5.scrollTop;};
var YtableEmulator6=document.getElementById('y-table-emulator6');var table6=document.getElementById('table-body6');YtableEmulator6.style.height=table6.client Height===0?"330px":table6.clientHeight+"px";var scrollablePanel6=document.getElementById('scroll6' );var headerContainer6=document.getElementById('header-container6');var YfakeScrollablePanel6=document.getElementById('y-fake-scroll6');YfakeScrollablePanel6.style.top=headerCo ntainer6.clientHeight===0?"34px":headerContainer6. clientHeight+"px";YfakeScrollablePanel6.onscroll=f unction(ytab6){scrollablePanel6.scrollTop=YfakeScr ollablePanel6.scrollTop;};
var YtableEmulator7=document.getElementById('y-table-emulator7');var table7=document.getElementById('table-body7');YtableEmulator7.style.height=table7.client Height===0?"330px":table7.clientHeight+"px";var scrollablePanel7=document.getElementById('scroll7' );var headerContainer7=document.getElementById('header-container7');var YfakeScrollablePanel7=document.getElementById('y-fake-scroll7');YfakeScrollablePanel7.style.top=headerCo ntainer7.clientHeight===0?"34px":headerContainer7. clientHeight+"px";YfakeScrollablePanel7.onscroll=f unction(ytab7){scrollablePanel7.scrollTop=YfakeScr ollablePanel7.scrollTop;};
var YtableEmulator8=document.getElementById('y-table-emulator8');var table8=document.getElementById('table-body8');YtableEmulator8.style.height=table8.client Height===0?"330px":table8.clientHeight+"px";var scrollablePanel8=document.getElementById('scroll8' );var headerContainer8=document.getElementById('header-container8');var YfakeScrollablePanel8=document.getElementById('y-fake-scroll8');YfakeScrollablePanel8.style.top=headerCo ntainer8.clientHeight===0?"34px":headerContainer8. clientHeight+"px";YfakeScrollablePanel8.onscroll=f unction(ytab8){scrollablePanel8.scrollTop=YfakeScr ollablePanel8.scrollTop;};
var YtableEmulator9=document.getElementById('y-table-emulator9');var table9=document.getElementById('table-body9');YtableEmulator9.style.height=table9.client Height===0?"330px":table9.clientHeight+"px";var scrollablePanel9=document.getElementById('scroll9' );var headerContainer9=document.getElementById('header-container9');var YfakeScrollablePanel9=document.getElementById('y-fake-scroll9');YfakeScrollablePanel9.style.top=headerCo ntainer9.clientHeight===0?"34px":headerContainer9. clientHeight+"px";YfakeScrollablePanel9.onscroll=f unction(ytab9){scrollablePanel9.scrollTop=YfakeScr ollablePanel9.scrollTop;};
var YtableEmulator=document.getElementById('y-table-emulator');var table=document.getElementById('table-body');YtableEmulator.style.height=table.clientHei ght===0?"330px":table.clientHeight+"px";var scrollablePanel=document.getElementById('scroll'); var headerContainer=document.getElementById('header-container');var YfakeScrollablePanel=document.getElementById('y-fake-scroll');YfakeScrollablePanel.style.top=headerCont ainer.clientHeight===0?"34px":headerContainer.clie ntHeight+"px";YfakeScrollablePanel.onscroll=functi on(ytab){scrollablePanel.scrollTop=YfakeScrollable Panel.scrollTop;};
Lo más extraño de todo, es que el "error" supuestamente está en...
var YtableEmulator7=document.getElementById('y-table-emulator7');var table7=document.getElementById('table-body7');YtableEmulator7.style.height=table7.clientHeight===0
Es igual al resto y no logro comprender lo que hay que corregir...
De paso, quien me ayude a optimizar este código, me vendría genial
PD. Es un simple script para utilizar el scroll en un <tbody>.
Desde ya, muchas gracias!
Saudos,
Nicolás.