/    Sign up×
Community /Pin to ProfileBookmark

Javascript error in browser

Hi all,
I took my js out of the code for my webpage and put it in a file. The js gives me an error in the bottom left handside of the browser.
[url]http://216.219.94.105/index.cfm[/url]

The problem happened after I added this code in my head tag:
<script type=”text/javascript” src=”js/preloading.js”></script>

And then this is the code for the preloading.js:

function preloadImages() {
var d=document; if(d.images){ if(!d.p) d.p=new Array();
var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
if (a.indexOf(“#”)!=0){ d.p[j]=new Image; d.p[j++].src=a;}}
}

Also it seems that the preload is not really working? . Thanks for any help in advance?

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@CrazyMerlinSep 10.2007 — try making your code easier to read and you may spot a mistake somewhere:
<i>
</i>function preloadImages()
{
var d=document;
if(d.images)
{
if(!d.p)
{
d.p=new Array();
}

<i> </i> var i;
<i> </i> var j = d.p.length;
<i> </i> var a = preloadImages.arguments;
<i> </i> for (var i = 0; i &lt; a.length; i ++)
<i> </i> {
<i> </i> if (a.indexOf("#")!=0)
<i> </i> {
<i> </i> d.p[j] = new Image;
<i> </i> d.p[j++].src = a;
<i> </i> }
<i> </i> }
<i> </i>}
}
Copy linkTweet thisAlerts:
@Angry_Black_ManSep 10.2007 — unfortunately i couldnt get to your site because my work's firewall didnt categorize it. but i couldnt see any syntax issues unfortunately.
×

Success!

Help @eddietheeagle 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 5.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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...