/    Sign up×
Community /Pin to ProfileBookmark

Hi I’m new here ^^ innerhtml question IE problem!

Hi everyone I’m new here and wanted to say Hi to everyone.

… and maybe ask for some help I’m quite new to using Javascript Css and PHP for making dynamic pages but so far has it been working alright so far ?

But I’m currently stuck on a IE problem, this works excellent in Firefox but is so damn slow in IE.?

when changing the content in a div with innerHTML all content in the div becomes damn slow Mouseover effects and other things are shown long after the mouse has passed… the things is it perfectly in Firefox … anyone got an Idea on how to make this more speed it up so that IE users can use the site to:eek:

[CODE]var target=”;
var area_to_update=””;
var focus_data = new Array();
var stringed_data = new Array();
var nshow_data = new Array();
function layout_episode_info()
{
var recount=0;
focus_data=”;
select_data=”;
focus_data_count=focus_data_raw.split(“#numb#”);
stringed_data=focus_data_count[1].split(“:;;:”);
if(focus_data_count[0]>20){document.getElementById(area_to_update).innerHTML = “<TABLE id = ‘section_information’ ><TR><TD align=’center’><IMG SRC=’layout/default/symbol_loading.png’></TD></TR></TABLE>”;}
for(xn=1;xn<focus_data_count[0];xn++)
{
show_data=stringed_data[xn-1].split(“:;:”);
mouseovereffect=”onMouseover=”this.style.backgroundColor=’#d9e5ff'” onMouseout=”this.style.backgroundColor=’#f8f8f8′””;
if(show_data[4]==’0′){stars=”<IMG SRC=’layout/default/symbol_rating_blanc.png’><IMG SRC=’layout/default/symbol_rating_blanc.png’><IMG SRC=’layout/default/symbol_rating_blanc.png’><IMG SRC=’layout/default/symbol_rating_blanc.png’><IMG SRC=’layout/default/symbol_rating_blanc.png’>”;}
focus_data = focus_data + “<TABLE “+mouseovereffect+” id='”+show_data[0]+”‘><TR><TD id=’section_data_modfield_max’><IMG SRC=’layout/default/ab_maximize.png’><IMG SRC=’layout/default/symbol_release_temp_cold.png’></TD><TD id=’section_data_modfield_episode’>”+show_data[2]+”</TD><TD id=’section_data_modfield_episode_textfield’>”+show_data[3]+”</TD><TD id=’section_data_modfield_episode_rating’>”+stars+”</TD><TD id=’section_data_modfield_episode_releases’>None found!</TD><TD id=’section_data_modfield_episode_airing’>”+show_data[6]+”</TD></TR></TABLE>”;
}
document.getElementById(area_to_update).innerHTML = focus_data;
}[/CODE]

Thanks for your help Masj ?
I will try to assist people on this site as much as I’m capable ?

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@astupidnameMar 10.2009 — Have you tried pre-loading the images? You could add this in to pre-load them:

[CODE]function preLoadImages(arr) {
for (var i = 0, preLoaded = []; i < arr.length; i++) {
preLoaded[i] = new Image();
preLoaded[i].src = arr[i];
}
}

preLoadImages([
'layout/default/symbol_loading.png',
'layout/default/symbol_rating_blanc.png',
'layout/default/ab_maximize.png',
'layout/default/symbol_release_temp_cold.png'
]);[/CODE]
Copy linkTweet thisAlerts:
@astupidnameMar 10.2009 — Also, onmouseover and onmouseout should be spelled all lowercase letters
Copy linkTweet thisAlerts:
@MasjauthorMar 10.2009 — Thanks I think that it might be a very good idea to pre load the pictures but still I don't know if I did a good explanation on the problem

try opening this page in IE:

http://masj.komugi.se/project/

The links are the text on the top marked with " " when you have chosen a target press the image with the text "Episodes" close to the bottom then you should see the problem.

Everything is very slow in IE but works perfectly in Firefox.

Thanks for you help Masj
×

Success!

Help @Masj spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...