Thursday, March 31, 2011

Calling a javascript function at the end of button click code behind

How do you call a javascript function at the end of button click code behind?

From stackoverflow
  • You probably want the onmouseup event:

    <button onmouseup="alert('You release the mouse button!')">Click me</button>
    
  • If you're working in .NET you could try

    ScriptManager.RegisterClientScriptBlock(myButton, this.GetType(), "BlockName", "alert('hello world');", true);
    
    Chetan : this really worked... thanks :)

0 comments:

Post a Comment