/    Sign up×
Community /Pin to ProfileBookmark

Browser problems IE problem but Firefox is fine

Hi again,

I do all my scripting in Mozilla firefox and work of Windows 2000 Pro. I write all my scripts in googlepages.

When working in Firefox and testing scripts it always works fine but if I have to move to IE there is always some type of problem. I decide to then work in IE but when using the same script as with Firefox then nothing works?

I am really confused, here is an example link view it in Firefox and the images for rollover work perfect, change to IE and it is not as clean when mouesover from one to the next. [URL=”http://kamikazegolden.googlepages.com/test3″]http://kamikazegolden.googlepages.com/test3[/URL]

And this is my script:

[QUOTE]

<style type=”text/css”>
<!–
body {background-image: url(“http://kamikazegolden.googlepages.com/manga.jpg“); background-attachment: fixed; }
–>
</style>
<script language=”JavaScript”>
<!–
if (document.images)
{
preload_image_object = new Image();
image_url = new Array();
image_url[0] = “http://kamikazegolden.googlepages.com/TWI.jpg/TWI-custom;size:176,177.jpg“;
image_url[1] = “http://kamikazegolden.googlepages.com/no_pic.gif“;
var i = 0;
for(i=0; i<=1; i++)
preload_image_object.src = image_url[i];
}
function show(url) {
document.images[“pic1”].src=url;
document.images[“pic1”].style.visibility = “visible”;
}
function hide() {
document.images[“pic1”].style.visibility = “hidden”;
}
//–>
</script>
<font style=”font-family: trebuchet ms; color: rgb(0, 0, 153);” size=”4″><a href=”http://kamikazegolden.googlepages.com/zabimarux-secondincommand3” onmouseover=”show(&#39;http://kamikazegolden.googlepages.com/TWI.jpg/TWI-custom;size:176,177.jpg&#39?” onmouseout=”hide()”>Twilight Assassin</a>; <a href=”http://kamikazegolden.googlepages.com/zabimarux-secondincommand3” onmouseover=”show(&#39;http://kamikazegolden.googlepages.com/no_pic.gif&#39?” onmouseout=”hide()”>Fecken-Good</a></font>
<p><img name=”pic1″ src=”http://kamikazegolden.googlepages.com/mouse0.gif” style=”visibility: hidden; width: 200px; height: 200px;” hspace=”160″></p>

[/QUOTE]

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@KorMar 20.2007 — Despite the general believes, the "preloading codes" are of no use. The problem is that the loading process is a little bit longer for IE, thus the image first gets its visibility that the image changes it's SRC.

One possible improvement (in fact you should have done that by default) it to use relative addresses not absolute. When using relative addresses, the picture is loaded from the server only first time, the rest of the time will be loaded from the browser's cache

Try:

onmouseover="show('TWI.jpg/TWI-custom;size:176,177.jpg')

......

onmouseover="show('no_pic.gif')"

You should work more as a professional. Put all your pictures into a folder, say [B]images[/B], give shorter and suggestive names to your pictures, avoid too many special characters in the file names, and things like that.
×

Success!

Help @cammo911 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.17,
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,
)...