Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #20669

IE Table Row Problems -- Resolved I think

From "Mel Smith" <med_cutout_syntel@aol.com>
Newsgroups comp.lang.javascript
Subject IE Table Row Problems -- Resolved I think
Date 2013-07-15 14:55 -0600
Message-ID <b4j5v0Foci5U1@mid.individual.net> (permalink)

Show all headers | View raw


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

Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

IE Table Row Problems -- Resolved I think "Mel Smith" <med_cutout_syntel@aol.com> - 2013-07-15 14:55 -0600
  Re: IE Table Row Problems -- Resolved I think "Mel Smith" <med_cutout_syntel@aol.com> - 2013-07-15 17:35 -0600
  Re: IE Table Row Problems -- Resolved I think JJ <duh@nah.meh> - 2013-07-16 07:09 +0700
    Re: IE Table Row Problems -- Resolved I think "Mel Smith" <med_cutout_syntel@aol.com> - 2013-07-16 08:42 -0600

csiph-web