No problem. I had a simmilar problem on my User Control. I made a public bool
property on the control and passed it into an if statement inside javascript
which executed when true...:
if (<%=MyBool.ToString().ToLower()%>)
{
// execute what you have to
}
Put this script inside client aspx/ascx file and it will execute when the
property will be true... Of course set the property to true in the server click
event.