• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Javascript code not working in IE8 but works in IE7

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the below code snippet , the innerdivhtml has the innerhtml of a big div element. In this, the "value" of the html tag that match the search are removed using regex.

This is code is working fine in IE7. BUT this code consistently fails in IE8.

var innerDivHTML = innerDiv.split(recLevel + 1).join(newRecLevel);
.
.
.
innerDivHTML = innerDivHTML.replace(/(NAME="RECORD\|)(\S*)(\s*)(value=")(\d*)(")/gi, "$1$2$3$4$6");
innerDivHTML = innerDivHTML.replace(/(value=")(\d*)(")(\s*)(NAME="RECORD\|)(\S*)/gi, "$1$3$4$5$6");
innerDivHTML = innerDivHTML.replace(/(NAME=RECORD\|)(\S*)(\s*)(value=)(\d*)/gi, "$1$2$3$4");
innerDivHTML = innerDivHTML.replace(/(value=)(\d*)(\s*)(NAME=RECORD\|)(\S*)/gi, "$1$3$4$5");*/

Please HELP.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HOW does it fail?
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to out HTML / JavaScript forum.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please read this for more information.
reply
    Bookmark Topic Watch Topic
  • New Topic