locked
Call Javascript on ItemReOrder of Ajax Re Order List RRS feed

  • Question

  • User1668171594 posted

    Hi,

    I am having a requirement that i have to call a javascript when an item is re ordered in Ajax re order list.

    have tried the below mentioned ways but nothing seems to work out for me any help on this will be appreciated.

    on item reorder even i am calling the javascript in the below mentioned ways.

    Response.Write("/<script language='javascript'>alert('Hi');</script>"); and

    ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "TestScript", "test();", true);

    and my test function contains the following script.

    <script type="text/javascript" language="javascript">

     function test() {

            alert('HI');

        }

    </script>

     

    Monday, April 7, 2014 5:51 AM

All replies

  • User1208776063 posted

    Response.Write("/<script language='javascript'>alert('Hi');</script>"); and

    ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "TestScript", "test();", true);

    Response.Write may not work if you are using AJAX. But, scriptmanager should work, although you can just invoke with this instead of this.Page.

    ScriptManager.RegisterStartupScript(thisthis.GetType()"TestScript""test();"true);

    You can view page source and verify if this function is added at the very bottom of the page. If you do not see that line in the page source, you would know that something is wrong with that RegisterStartupScript line.

    Monday, April 7, 2014 12:28 PM
  • User1668171594 posted

    Hi,

    Tried this but no luck :(

    Thursday, April 10, 2014 6:25 AM