Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Mel Smith" Newsgroups: comp.lang.javascript Subject: IE Table Row Problems -- Resolved I think Date: Mon, 15 Jul 2013 14:55:57 -0600 Lines: 44 Message-ID: X-Trace: individual.net VhOW60/xubHxS/Y3b/GeRg3VMXEKfa7YgfNVazyaH5Hh+gSQQx Cancel-Lock: sha1:0sPYgnXd+HLplIriz7Zqc7r4kZw= X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-RFC2646: Format=Flowed; Original Xref: csiph.com comp.lang.javascript:20669 Hi: I ran into problems deleting rows of a table this morning where IE (version 8 & 10) were different in deleting rows of a table than Chrome or FF or Safari. My resolution (after googling) is as follows : ******************************************************************* if (getieusage() === -1) { // means *NOT*using Internet Exlorer mytable.deleteRow(nrowindex) ; // Delete the row } else mytable.deleteRow(nrowindex-1) // Yes, we *ARE* using IE -- so decrement the row index } // and the proper row of the table is deleted by IE, FF, and Chrome -- at least ******************************************************************* where getieusage is as follows: ******************************************************** function getieusage() // Returns the version of Internet Explorer or a -1 // (indicating the use of another browser). { var rv = -1; // Return value assumes failure. if (navigator.appName == 'Microsoft Internet Explorer') { var ua = navigator.userAgent; var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})"); if (re.exec(ua) != null) rv = parseFloat( RegExp.$1 ); } return rv; } ******************************************************** Perhaps someone can use (or improve upon) my solution. -- Mel Smith