Function does not fired

i have few javascript functions for validation
txtQty.Attributes.Add(“onblur”, “javascript:ValidateQty();”)
txtAdjPart.Attributes.Add(“onblur”, “javascript:ValidatePart();”)

i have called this on a command button click

but it doesnot get fired

even on the blur of the individual txt control the function doesnot get fired

Hi
Try use the Firebug addon in Mozilla browser to debug the javascript code.
In console you’ll see if there is errors in JS script, and which line.

the function has no errors .
it gets fired if there is focus on it

wht i need is even if the user doesnot foucs on the textcontrols & directly clicks the command button i still need the validations of text controls to take place

Hi
Just add an “onclick” event to that button, to call the validation function.
Something like this in js code:

cument.getElementById('id_button').onclick = function(){ return functionName();};