/    Sign up×
Community /Pin to ProfileBookmark

Button on…..- states

Hi,

I made a button using a css class (defining size and initial image), after that the <a> tag contains three javascriptfunction calls (onOver, onOut, onClick) but when i start the html page…. the functions don’t seem to work, but clicking on them and moving away with my mouse seems to “initialize” them, after that the buttons work just fine (so 3 different buttons require all a click of there own). So the problem seems to be in when the button or the javascript “initializes”.

Thanks for your ideas!!

grtz

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@UltimaterApr 13.2005 — Can you show us some code? I want to see your HTML lay-out.

I don't "see" how you made a button that works with the <a> tag...
Copy linkTweet thisAlerts:
@ParaauthorApr 13.2005 — ok.. it's all css... here's the link:

[URL=http://www.pixelis.nl/test/knopjes.htm]link[/URL]

thx
Copy linkTweet thisAlerts:
@UltimaterApr 13.2005 — Here's your answer:
[code=html]
<script language="JavaScript" type="text/javascript">
onload=function(){
Toggle("menu1")
Toggle("menu2")
Toggle("menu3")
}
</script>
[/code]
Copy linkTweet thisAlerts:
@ParaauthorApr 13.2005 — Thx a million times ?

but one question remains.... why does this work?? Caus i expected that the button would fold out by calling this function onload. But it fixes the problem indeed.. that was the most important part ?

thx again!
Copy linkTweet thisAlerts:
@UltimaterApr 13.2005 — This is why it works:
[code=html]
<script language="JavaScript" type="text/javascript">
onload=function(){
menu1.style.display="none";
menu2.style.display="none";
menu3.style.display="none";
up="0px -60px";
down="0px 0px";
kleur="#FC6401";
origineel="#ffffff";
}
</script>
[/code]
×

Success!

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