help me understand JS execution on onclick event of button
Posted
by Anil Namde
on Stack Overflow
See other posts from Stack Overflow
or by Anil Namde
Published on 2010-05-28T10:30:41Z
Indexed on
2010/05/28
10:41 UTC
Read the original article
Hit count: 241
ASP.NET
|JavaScript
<input type="button" name="reset"
onclick="return ValidateValue(); __doPostBack('ApplyBtn','')" />
The above is the code generated for asp server button button control on browser.
Now my query is that irrespective of ValidateValue()
returning true/false __doPostBack('ApplyBtn','')
function is not showing any effect for me.
My understanding is that string passed to onclick acts like function body, and return
will from first function will return control preventing second function from execution.
Is that correct ?
Please provide helpful inputs.
© Stack Overflow or respective owner