Solved

what is "return true"?

Posted on 1998-08-30
3
160 Views
Last Modified: 2010-04-09
i was told that i need "return true"
with this rollover
but it seems to be working well...
do i really need it?
what does it do?


<A HREF="aa.html"
ONMOUSEOVER ="document.bgColor='#010470'" ;"
onMouseOut="document.bgColor='#1BA6EF'">
<img SRC="images/qalw.gif"
 border=0></A>
0
Comment
Question by:asacui
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 8

Accepted Solution

by:
jbirk earned 0 total points
ID: 1837211
It's not necesary to return true when you are only changing comething like the bgColor or swapping an image, etc.  However if you want to change the window.status property (the status bar message) you need to return true in order to prevent the browser from dispolaying the url of the link in the status bar.  In this case you probably want the url to be displayed and thus should NOT return true.

-Josh
0
 

Author Comment

by:asacui
ID: 1837212
thankyou
0
 
LVL 4

Expert Comment

by:martinag
ID: 1837213
By returning true you tell the browser that you have handled the event (MouseOver) and that you do not want the browser to do what it usually does (displaying URL).

Martin
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question