Re: newbie.. why "return false;" ?




On Thu, 28 Feb 2008 03:32:45 +0100, Stevo <please@xxxxxxxxxxx> wrote:

RobC wrote:
A newbie question.

I've seen " return false;" in several code samples (relating to
functions).

Is it required or is it optional?
What does it do?

http://www.google.com/search?q=tutorial+javascript+programming+language+function+return+false+beginners

The first link in that google search looks like it explains the basics
quite well for beginners:

http://www.codeproject.com/KB/scripting/jsbeginner.aspx

Codeproject looks like it'll be very helpful!

Thanks
Rob
.



Relevant Pages

  • Re: newbie.. why "return false;" ?
    ... RobC wrote: ... I've seen " return false;" in several code samples (relating to ... The first link in that google search looks like it explains the basics quite well for beginners: ...
    (comp.lang.javascript)
  • Re: newbie.. why "return false;" ?
    ... A newbie question. ... I've seen " return false;" in several code samples (relating to ... event and by returning false it's preventing default browser behaviour. ...
    (comp.lang.javascript)