Tuesday, April 27, 2010

Override JavaScript in SharePoint

We were facing a issue in discussion list in SharePoint as below:

On click of Reply button in SharePoint discussion , users were getting error page.

So we decided to override onclick function i.e. GoToPage .

We wrote javascript block in Flat.aspx in Discusion list Definition to Override default Behavior & in that one wrote script  that will open custom page in Pop-up , user Can easily reply to Discussion.

Script block in Flat.aspx is as below :













In this way you can Override SharePoint javascript functions with the way you want to use it.

2 comments:

  1. Where did you place this code in the .aspx file?

    Thanks,
    Mark

    ReplyDelete
  2. Hi Mark ,

    I have added the above script tag inside Main ContentPlaceHolder

    Warm Regards,
    Manesh

    ReplyDelete