Hi, Think of the event handler as a function. What's the difference between these two functions?
function handler1() { checkLogin(); } function handler2() { Effect.BlindDown('error'); return false; } Right -- in the first one, you're not returning anything, and so the default action continues. Just add a return: <input type="image" src="images/login2.png" id="submit" onclick="return checkLogin()" /> HTH, -- T.J. Crowder Independent Software Consultant tj / crowder software / com www.crowdersoftware.com On Jul 12, 6:15 pm, Silvershaft <samppalehtonenle...@gmail.com> wrote: > I got a little problem with using the Effect.appear function, if I put > it like this > > function checkLogin() > { > Effect.BlindDown('error'); return false; > > } > > It works crap that way, I have to click the button two times to make > the effect come, but if I put the text right inside the onClick > function it works flawlessly what is the difference of these actually? > > <input type="image" src="images/login2.png" id="submit" > onclick="checkLogin()" /> > <input type="image" src="images/login2.png" id="submit" > onclick="Effect.BlindDown('error'); return false;" /> > > I am beginner with this, sorry.. -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.