PDA

View Full Version : Possible Stack Overflow?



thesprucegoose
03-12-2009, 03:07 PM
I can't figure out why this page is acting the way it is
http://www.wildearthride.com/hexCode/hope.html

It basically just keeps loading and loading and loading. It won't read my styles at all.

Any feedback would be appreciated.



<script language="javascript">
$.get("form_data4.txt", function(data){
var queryString = data;
var queryArray = queryString.split('&');

if (!queryArray[queryArray.length - 1])
queryArray.pop();

for (var index = 0; index < queryArray.length; ++index) {
var item = queryArray[index].split('=');
eval('var ' + item[0] + '="' + item[1] + '"');
}


// alert(queryArray[1]);

document.write("<div id='test'>");
document.write(numPhotos);
document.write("</div>");





});
</script>

thesprucegoose
03-12-2009, 03:42 PM
Solved. It was an issue with document.write()

I'm using .innerHTML instead.

jscheuer1
03-12-2009, 06:31 PM
Your page fails in Opera and IE because of this (highlighted):


. . . oCaptionOne.innerHTML = photoCaption0;

var photoSpeciesOne = document.getElementById('photoSpecies1');
if (photoSpeciesOne)
photoSpeciesOne.innerHTML = photoSpecies0;

-->


});
</script>
<div class="test">
<div id="photoFile1"></div>
<div id="photoCaptionID1"></di . . .

It should be removed.

thesprucegoose
03-12-2009, 06:49 PM
Thanks. This is all very rough and in development. I also don't have to worry about this going in multiple browsers because it's specifically going to run off a local drive running FF.