This is the
THIRD [
^]time you are asking the same thing.
Are you that dumb? A simple thing has been suggested to you.
How did you bind this script with your button?
Did you do:
btnClick.Attributes.Add("onclick", "chartPopup2();");
You need to bind the JavaScript method to the button. System is not intelligent enough to apply your JavaScript method to a button by itself.
If you are unable to make out, go study some books, learn how to learn first.