tags:

views:

28

answers:

0

Hi, I was wondering if it was possible to call a javascript after the button click has done its thing in asp.net 3.5

I have a script manager in master page and a button in the content page. The button just populates some repeater in a div with some data and I am setting the div's visibile=true in codebehind (the div is runat=server)

this works fine, but I thought it would be "looking great" if the div, instead of just appearing, slides down slowly. So I added this script in the end of button click function:

ClientScript.RegisterClientScriptBlock(typeof(Page), "goDown", "<Script type='javascript'> $('.divNinjas').slideDown(); </script>");

It did not seem to do anything at all. So I thought there might be a way to catch the "end response" event of ajax call back and see what triggered it and then call this function in client side.

Is it too complicated? is there any other way that this can be achieved?

Fanks!