Solved

what is "return true"?

Posted on 1998-08-30
3
161 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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
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.…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

705 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