/    Sign up×
Community /Pin to ProfileBookmark

image preload script

i created an interactive map in photoshop/imageready for a website i’m developing…no…not developing….simply trying to add some stylistic elements to, at the request of its owners….

lemme backtrack here….i’m learning everything to do with javascript, html, and the technical aspects of web development as i go….and feel so in over my head ?

anyway….i previewed the map in both IE and firefox and saved the code, then pasted the resulting table into an existing page code

the preload script (i think) is not bringing up the pics….in IE, the code yields placeholders for all the images, but broken links….in firefox, it sets off an endless download loop, and page never reaches “done”

so this is the place to start….does this look right? (note: in the simple cut and paste below, all the indents have been lost….but they are all there in the source code)

[quote]

<!– ImageReady Preload Script (mywvtry copy.html) –>
<SCRIPT type=text/javascript>
<!–

function newImage(arg) {
if (document.images) {
rslt = new Image();
rslt.src = arg;
return rslt;
}
}

function changeImages() {
if (document.images && (preloadFlag == true)) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
}
}
}

var preloadFlag = false;
function preloadImages() {
if (document.images) {

[/quote]

then a list of the images, edited out to shorten this post…..then

[quote]


preloadFlag = true;
}
}

// –>
</SCRIPT>
<!– End Preload Script –>

[/quote]

any and all advice or suggestions would be greatly appreciated ?

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@iltosauthorSep 02.2005 — ok, it is sort of up and running...stylistically, i've some change in mind, but here 'tis

http://home.earthlink.net/~la_odyssey/calomertest

if you've both firefox and IE, and have got the time, i'd appreciate knowing why it loads and displays so bizarrely in IE, and relatively cleanly in firefox.
×

Success!

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