/    Sign up×
Community /Pin to ProfileBookmark

make several imageflips

hi!
I’m trying to make the link switch color when you move the cursor over them using the script from this page
[url]http://www.htmlgoodies.com/tutorials/web_graphics/article.php/3479941[/url]
the result is
[url]http://www.cobeflow.com/java.htm[/url]

On purpose i’ve only tried to script the links “bilder” and “utstilling” (cause i can’t make it work and don’t want the codes to be too complicated)

but as you see “utstilling” is changing nothe when i scroll over “utstilling” AND “bilder”…..

Can anybody please tell me what i’m doing wrong???

I’ve also tride to make everything as one script, like below, but that didn’t work either….

<script type=”text/javascript” language=”javascript”>
<!– hide from none JavaScript Browsers

Image1= new Image(40,24)
Image1.src = “images/knapper/bilder.jpg”
Image2 = new Image(40,24)
Image2.src = “images/knapper/bilderinna.jpg”
Image3= new Image(40,24)
Image3.src = “images/knapper/utstilling.jpg”
Image4 = new Image(40,24)
Image4.src = “images/knapper/utstillinginna.jpg”

function SwapOut() {
document.imageflip.src = Image2.src; return true;
}
function SwapBack() {
document.imageflip.src = Image1.src; return true;
}

function SwapOut() {
document.utstilling.src = Image4.src; return true;
}
function SwapBack() {
document.utstilling.src = Image3.src; return true;
}

// – stop hiding –>
</script>
</head>

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@cobeflowauthorJul 03.2007 — noone has any idea what i'm doing wrong??
Copy linkTweet thisAlerts:
@Logic_AliJul 03.2007 — noone has any idea what i'm doing wrong??[/QUOTE]
That function is hard-coded to address only one image placeholder. If you write a second function with the same name, it overwrites the first. Are you trying to learn the language or just looking for a solution?
Copy linkTweet thisAlerts:
@cobeflowauthorJul 09.2007 — well, i'd like a solution. But if I learn something as well that'll be a bonus! ?

I know html, but are new at javascripting and css..
Copy linkTweet thisAlerts:
@Logic_AliJul 09.2007 — well, i'd like a solution. But if I learn something as well that'll be a bonus! ?
[/QUOTE]
Try installing [B][COLOR="green"]SmartRoll[/COLOR][/B]. At least you'll learn to avoid the 'click on our banners' websites.
×

Success!

Help @cobeflow 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.4,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

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