ricmetal
07-03-2012, 01:47 AM
hi guys
i've attached an on click method to a html submit button via jQuery. this button runs a function and then a return false to avoid the button's default action.
thing is, attaching return false, via jQuery, after the function call does not avoid the button's default action, but if i omit the function call, returning false does indeed avoid the buttun's default action.
the same goes for adding return false to the button's html onclick attribute, while running the function, on click, set via jQuery. the button's default action is halted.
anyone explain this behaviour or point me in direction to some reading material?
i've attached an on click method to a html submit button via jQuery. this button runs a function and then a return false to avoid the button's default action.
thing is, attaching return false, via jQuery, after the function call does not avoid the button's default action, but if i omit the function call, returning false does indeed avoid the buttun's default action.
the same goes for adding return false to the button's html onclick attribute, while running the function, on click, set via jQuery. the button's default action is halted.
anyone explain this behaviour or point me in direction to some reading material?