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
Solved

what is "return true"?

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CSS: How do I override in-line styling 11 25
how to debug htl and js pages 8 39
VBScript on Html 15 47
send email part1 9 28
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

860 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