I use jquery to read a file and populate a container DIV with a row of DIVS this seems to work in all browsers even IE11 sometimes . If I refresh it in IE sometime all the divs disappear except the container div.
however if in IE I hit f12 all the divs reappear is there some issue with a race condition or something? how would I deal with this in IE?
<script>
$.urlParam = function(name){
var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href);
if (results==null){
return null;
}
else{
return results[1] || 0;
}
}
$.get("./" + $.urlParam("dashboard") + ".txt" , function(data) {
var divIs = "none";
var lines = data.split("\n");
$.each
(
lines, function(n, elem)
{
var info = elem.split(",");
var exitsDiv = $('#' + info[1]).length;
if ((exitsDiv == 0) && (info[1] != undefined) )
{
$('#container').append('<div id=' + info[1] + ' class=columns><font color=#BDBDBD size=5>' + info[1] + '</font></div> <div id=' + info[1] + 'spacer1 class=spacer style="background-color: #D6D6D4; width: 3px; height: 4px;"></div>');
divIs = info[1];
$('.columns').corner(); //jQuery.corners to round the columns
$('.columns').css({'background-image':'url(./green.png)'}); //insert the green.pg for the header
$('.columns').css({'background-repeat': 'no-repeat'});//only want the bgimage to show up once
}
var hrefText =info[2];
if ((info[1] != undefined))
{
if (hrefText.substring(0,1) != ' ')
{
hrefText = "<h<font size=6><b>" + hrefText + "</b></font>"
}
else
{
hrefText = " " + hrefText
}
}
$('#' + info[1]).append('<p><a href=' + info[3] + ' target="_blank">' + hrefText + '</a></p>');
}
);
var today = new Date(); //get the current year for the copyright statement
var yearCurrent = today.getFullYear();
$('#container').append('<div class=spacerHorizontal></div><div class=footerDIV ><img src=./logo.png></img><img src=./ICTRDS.PNG></img><br><center><a href=http://www.usask.ca/isa/contact/ target="_blank">Contact ICT-DS</a>  |  <a href=http://www.usask.ca/disclaimer.php target="_blank">Disclaimer</a>  |  <a href=http://www.usask.ca/ target="_blank">©U of S</a>  <span id="years">1994-' + yearCurrent + '</span></center></div>');
$('.footerDIV').corner(); //jQuery.corners to round the footer
});
</script>