What causes the content of my container to disappear following a setInterval div swap in Internet Explorer?

While developing a website on Chrome and Firefox, I was informed that it also needs to function properly in Internet Explorer. I managed to resolve the double padding issue in IE, but now I'm facing a new problem. The content of my "grid" disappears after the JavaScript setinterval function replaces the div. This issue only occurs when viewing the page in IE.

Below is the code snippet leading up to where the content is dynamically created and displayed:

<div  id=\"col1a\" style=\"float:left; width:605px; height:300px;\"> \
            <div id=\"GridContent\" class=\"FormContent\"> \
                <div id=\"ContentPlaceHolder1_FormSection\" class=\"FormSection\"> \
                    <div id=\"ContentPlaceHolder1_ProgramGridHeader\" class=\"ProgramGridHeader\"> \
                        <div id=\"ContentPlaceHolder1_HeaderRow\" class=\"HeaderRow\"> \
                            <div readonly=\"readonly\" class=\"Cell\" style=\"width: 57px\">Stage</div><div class=\"Cell\" style=\"width: 78px\">Type</div><div class=\"Cell\" style=\"width: 50px\">Time</div><div class=\"Cell\" style=\"width: 44px\">Int</div><div class=\"Cell\" style=\"width: 44px\">Dry</div><div class=\"Cell\" style=\"width: 44px\">Wet</div><div class=\"Cell\" style=\"width: 52px\">RH%</div><div class=\"Cell\" style=\"width: 72px\">Option</div><div class=\"Cell\" style=\"width: 72px\">Damper</div><div class=\"Cell\" style=\"width: 44px\">Fan</div> \
                        </div><br /> \
                        <div class=\"Row\" position: relative;> \
                                 "};

And here is the CSS specifically for Internet Explorer:

.Row { border: solid 0px green; float: left; min-width: 0; clear:both; position: relative; -webkit-border; padding 1;}
.RowCompleted { border: solid 0px #7F9DB9; background-color: #C0C0C0; color: #000;}
.RowNoShower { border: solid 0px #7F9DB9; background-color: #FFF; color: #000;  min-width: 0; }
.RowColdShower { border: solid 1px #7F9DB9; background-color: #ADD8E6; color: #000; }
.RowWarmShower { border: solid 1px #7F9DB9; background-color: #FB0; color: #000; }
.RowHotShower { border: solid 1px #7F9DB9; background-color: #F00; color: #FFF; }
.RowInProgress { border: solid 0px #7F9DB9; background-color: #0F0; color: #000;}
.RowPaused { border: solid 0px #7F0DB9; background-color: #00F; color: #FFF;}

I would really appreciate any help in figuring out why the content disappears in IE. Thank you!

Answer №1

IE may fail to populate an element if the HTML is not valid.

It's possible that a tag is missing closure or there is an extra quote.

Could you share the entire HTML code you are attempting to replace it with?

Source:

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What are the reasons behind the unexpected behavior of the replace() method in the newest Safari update?

What is causing the JS method replace() to behave incorrectly in Safari version 11.1 when using "$<" in the second argument? For example: "aaaXXXbbb".replace(/XXX/, '_before_$<_after_') The actual result is: "aaa$<_after_bbb" The ex ...

A guide on serializing multiple objects returned from a loop using JSON.stringify

My MVC code involves adding multiple travelers objects to the travelers array generated in a loop, and then using JSON.stringify on them. return amadeus.booking.flightOrders.post( JSON.stringify({ 'data':{ 'type ...

Place two divs in the middle of another div with equal spacing in between

I am having trouble aligning two divs horizontally within another div while setting a maximum width for each. Additionally, I would like some spacing between the divs to avoid them touching. The following code isn't yielding the desired outcome: HTM ...

Implement CSS styling to specific elements

In this snippet of HTML code - <td col="Contact"> <span class="contactInfo"> 35373726<br> 65837366 </span> </td> <td col="Contact"> <span class=&qu ...

Each time the Angular children component is reloaded, the user is redirected to localhost:4200

In my Angular project, I encounter an issue with route parameters in children components. While navigating to these child components from the parent is seamless, reloading the child component causes the application to redirect to localhost:4200 and display ...

Tips for center-aligning layouts in Angular Material

I am struggling with the Angular Material flex layout, so I took this directly from the Angular Material website. Based on the documentation for layout container, items are arranged in a row with a max-height of 100% and max-width matching the width of th ...

What is the best way to rearrange the order of divs when the screen is being resized?

My task involves rendering a page with react-bootstrap on desktop, structured like this: <Row> <Col xs={12} md={8} className="a"> </Col> <Col xs={6} md={4} className="b"> </Col> <Col xs={6} md={4} className ...

Trouble with parsing dates in JavaScript using Moment.js

I'm retrieving dates from SQL Server that are passing through ASP.NET, and then iterating through a list of objects in jQuery to display the dates along with other data. However, regardless of the various date/time values coming from the database, the ...

Guide on how to clear and upload personalized information to Stormpath

After receiving JSON data from my client, I am looking to store it in Stormpath's custom data using node.js with express.js: I have set up a basic post route: app.post('/post', stormpath.loginRequired, function(req, res){ var data = req.b ...

Tracking changes in real time and calculating the sum with AJAX, PHP, and MySQL for efficient processing

Initially, I kindly request you to read this until the end. I am in dire need of assistance with my problem as I have searched for solutions but still remain clueless. https://i.sstatic.net/DAb1q.png Referring to the image provided, the first 'Produ ...

Adapting a CSS design

Having some trouble with creating a CSS style. Here's what I have so far: http://jsfiddle.net/WhNRK/26/ Originally designed for a label, but now attempting to modify it for something like this: <input type='radio' name='mcq' ...

Consistent Errors with AJAX POST Requests Despite CORS Enablement

Here is a function I have created for making an ajax post request: function POST(url, data) { $.ajax({ 'type' : "POST", 'url' : url, 'data' : data, headers : { 'Access-Cont ...

Using .each function with .getJSON

Seeking to connect data from two different requests by nesting a .getJSON function within a .each function. Utilizing the Wistia video api to load videos with basic info and display the play_count in the "stats" JSON. Attempted code provided below is not ...

I have to ensure that a plugin is only loaded once its dependency has been loaded with RequireJS

Currently, I am utilizing the jquery.validationEngine.js plugin and facing an issue. It seems that jqueryValidateEnglish is unable to function properly unless jqueryValidateEngine is loaded beforehand. In my code for jquery.wrapped.validationEnglish2.js, ...

Tips for stopping slide transition (moving to a different slide) in vue-slick-carousel?

I'm utilizing vue-slick-carousel to populate schedule data for a specific slide (in this case, a month). <vue-slick-carousel @afterChange="afterChange" @beforeChange="beforeChange" @swipe="swipe" class="te ...

Tips for incorporating dimensions from ajax svg text with jquery:

When receiving SVG content through AJAX jQuery, the width and height are missing. To solve this issue, we can add the width and height from the AJAX jQuery response. Code: $jd.ajax({ type: "POST", data: item, ...

Is it possible to set a different default page index other than 0 in a material table using reactjs?

I have noticed that the default page index in the material table is set to '0', but the API I am currently using begins with a page index of '1'. Is there a way to adjust the default page index of the table to match that of the API? ...

Tips for updating the appearance of a ListItem with a click action

For my current project, I am using Material UI and React. One of my components is structured as follows: import React, { Component } from 'react'; import { List, ListItem } from 'material-ui'; import PropTypes from 'prop-types&apo ...

Automatic mapping of posted values to objects is not working as expected in ASP.NET Web API

When trying to send a request with json content to a web api, I noticed that the values weren't automatically mapping to my object. The API Action I have is resulting in null outputs. [HttpPost] public IEnumerable<string> GetCustomerBy ...

Is it possible to upload an image file while the element is hidden with "display: none" property?

I need to upload a file using Selenium webdriver. Here is the URL of the page. <div class="async-upload__thumb item-image__area"> <div class="fab-dialog__thumb-drop-zone async-upload__thumb-drop-zone"> <p class="async-upload__thumb-ms ...