Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8962059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:02:38+00:00 2026-06-15T16:02:38+00:00

Need an intervention here, as I am pretty much losing my mind on this

  • 0

Need an intervention here, as I am pretty much losing my mind on this 0_o

I am using IE 9 and am using IE’s F12 developer tools, trying to test for IE8.
I am performing a pretty simple task with JavaScript.

I am grabbing some inner html – using it as a sting for whatever reason.

Like this:

<div id="Some_Container_div">

    <div class="Some_Inner_Div_Class">sometext</div>
    <div class="Some_Inner_Div_Class">sometext</div>
    <div class="Some_Inner_Div_Class">sometext</div>

</div>


<script>

var Div_Contaiers_Inner_Html_As_String = document.getElementById('Some_Container_div').innerHTML;

alert(Div_Contaiers_Inner_Html_As_String);

Array_Of_Divs = Div_Contaiers_Inner_Html_As_String.split("</div>");

alert(Array_Of_Divs);

</script>

The above code properly alerts:
First:

<div class="Some_Inner_Div_Class">sometext</div><div class="Some_Inner_Div_Class">sometext</div><div class="Some_Inner_Div_Class">sometext</div>

Then the second alerts the proper array:

<div class="Some_Inner_Div_Class">sometext,<div class="Some_Inner_Div_Class">sometext,<div class="Some_Inner_Div_Class">sometext,


If I now use the developer tools (f12) and switch to “Browser Mode” IE8 and I switch the “Document Mode” also to IE8 the browser now alerts :

First:

<DIV class=Some_Inner_Div_Class>sometext</DIV><DIV class=Some_Inner_Div_Class>sometext</DIV><DIV class=Some_Inner_Div_Class>sometext</DIV>
  • Notice the missing quotes now?
  • Notice the capitalization of the words ‘DIV’ now?

And next it alerts the same thing:

<DIV class=Some_Inner_Div_Class>sometext</DIV><DIV class=Some_Inner_Div_Class>sometext</DIV><DIV class=Some_Inner_Div_Class>sometext</DIV>

So it looks like it is not even splitting the string into an array now – not sure why, like it was not a string anymore.

If I now use the developer tools (f12) and keep “Browser Mode” IE8 and I switch the “Document Mode” also to IE9 – it works fine again….

So thanks so much for confusing me again Bill Gates 0_O

Anyway – so I looked through here for help – I see some people saying you should switch both “Browser Mode” to IE8 and “Document Mode” also to IE8 when testing with developer tools – but I do not see an explanation I understand as to why. and what is the difference if you switch just one or both.

In the mean time:

  • Can anyone tell me if this is going to work properly in IE8?
  • Why it is stripping the quotes out?
  • Why is it not creating the array in developer tools testing mode?

Thanks to all : )

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T16:02:40+00:00Added an answer on June 15, 2026 at 4:02 pm

    Short answer:

    It’s a compatibility issue. The JScript 5 engine (IE7/IE8) was severely flawed, and this is one of the things it does (stripping the "s from attributes and altering capitalization when generating an innerHTML string). As well, because innerHTML screws with capitalization, it’s trying to match your .split("</div>"); against a string containing </DIV> and failing.

    Try using .split(/<\/div>/i); instead. This won’t solve the loss of "s from your attributes, but it’s a partial fix. See this answer for a function that appears to fix missing quotes and capitalization if the quotes are necessary.


    In the larger issue of how to test against older versions of IE:

    In essence, the Browser Mode doesn’t do anything to how Internet Explorer renders the page1. Browser mode influences how IE acquires the page, changing the UserAgent sent to the server.

    Document Mode changes which version of the Trident rendering engine, and whether the IE9 Chakra Javascript engine or the IE8/IE7 variants of the JScript engine are used.

    TL;DR, for testing purposes you should change the Browser Mode to IE8, then observe whether the Document Mode defaults to IE8 Standards or Quirks. If the code is not working, toggle between the two. If the code then works, make sure you’re setting an appropriate DOCTYPE for whichever mode works (Transitional for Quirks mode, Strict for Standards mode).

    [1] Browser Mode also influences how the browser interprets conditional comments, and the default Document Mode (makes it match the Browser Mode), so changing only this is a good way of figuring out how IE8 will interpret the page… but this behavior breaks quickly if you have X-UA-Compatible Meta tags, so if you’re using those, just set Document Mode to match.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i need to find few words or matching pattern using a Javascript. this is
Need to apply a filter to a file like this: TUPAC_0006:1:1:2554:2356#0/1 0 * 0
Need a map reduce function by mongo in php This my mongo structure [_id]
Need just a push in the right direction with this. I'm building a multi-language
I'm not sure if this is the right place to ask, but here goes...
I've got a problem here with an MSI deployment that I'm working on (using
I am tracking objects for which I need to test if they are located
I am using Python and trying to connect to SFTP and want to retrieve
This is my first post here, therefore apologize for any blunders. I'm developing a
I need to implement the same functionality as this function on Win7 x64. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.