I written a function to validate on clicking Add button(submit) but the function is getting fired on clicking Add(html:submit) and Cancel(html:cancel).
i have textboox named 'categoryName' and button named 'Add' and 'cancel'
I written a javascript for a form like the following: