/    Sign up×
Community /Pin to ProfileBookmark

Hey I have just started learning a bit of javascript and I need some help on what proberly seems as a simpel matter.

My problem is that I can´t call more than one function in my onMouseOver event. Is that really the case and if so know do I work around it.

asbjoern

to post a comment
JavaScript

10 Comments(s)

Copy linkTweet thisAlerts:
@pyroNov 13.2003 — onmouseover="functionOne(); functionTwo();"
Copy linkTweet thisAlerts:
@fredmvNov 13.2003 — Alternatively:function doAll()
{
function1();
function2();
//...
}
onmouseover="doAll();"
Copy linkTweet thisAlerts:
@pyroNov 13.2003 — Seems kinda redundant to do anything like that just to run two functions, doesn't it?
Copy linkTweet thisAlerts:
@asbjoernauthorNov 13.2003 — thanks it must be something else, course I wrote it just like you recommended pyro, I ill try to specifi my quastion later (its 240 in the morning my time so I am of to bed) thanks for the quiks replys

asbjoern
Copy linkTweet thisAlerts:
@pyroNov 13.2003 — Sure thing... And when you re-phrase your question, the relavant code might help. ?
Copy linkTweet thisAlerts:
@fredmvNov 13.2003 — [i]Originally posted by pyro [/i]

[B]Seems kinda redundant to do anything like that just to run two functions, doesn't it? [/B][/QUOTE]
I agree with you, that's why I had "alternatively" before the code. However, he said [i]more than one function[/i], so in some cases, I find it easier to read inside of a function than all inside of an event handler. So you aren't always calling only two functions, you could call as many as you wanted but the code would still remain a little more readable. Either way, I see your point (I only make functions when I need to use the code more than once, which could possibly be the case), I was just offering an alternate way to do it. ?
Copy linkTweet thisAlerts:
@asbjoernauthorNov 13.2003 — sorry for all the touble, it was a f...ing spelling problem as basic as it gets.

Anyway I have a new quistion for you (simpel as well) I would like to attach a .js file in my html header (just like when you attach a external stylesheet) I just don't know the tags.

asbjoern
Copy linkTweet thisAlerts:
@fredmvNov 13.2003 — <script type="text/javascript" src="path/to/javascript.js"></script>
Copy linkTweet thisAlerts:
@pyroNov 13.2003 — <script type="text/javascript" src="functions.js"></script>
Copy linkTweet thisAlerts:
@asbjoernauthorNov 13.2003 — thanks

asbjoern
×

Success!

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