/    Sign up×
Community /Pin to ProfileBookmark

Window properties – The status property

We use the status property to inform visitors about the site they’ll seeif they click on a link. For example, if i have a link to a very graphics-intensive site, it would be a good idea to put a warning with the words “Warning, this site has a lot of graphics” And, this could appear in the status bar when the visitor mouses over the link. I would set it up as:
<a href=”http://…/” onMouseOver=”window.status=’Warning, this site has a lot of graphics’; return true;”>Animation something</a>

My question is :
—————-

Why is it return false in the case of onClick and return true in the case of onMouseOver ?

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@KorOct 10.2007 — [B]return[/B] stops the HTML action and waits for a Boolean, if any. In case of onclick in a link, [B]return false[/B] will prevent the HTML action, thus will stop the navigation to another address. The same acts [B]return false[/B] in case of [B]onsubmit[/B] event, will stop the submit process..

Why is otherwise in case of onmouseover applied upon window.status? Like one of my friends said once: "This is one of those things that you don't need to know exactly what it does; just put it in there."?
×

Success!

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