I am new to SharePoint 2010. Actually I have one div id in SharePoint Edit Form pages, this is for library , want to display a custom message instead of error, hide and show on the basis of div id using j Query/JavaScript. Does anyone know how to achieve this?

enter image description here

  • You just want to know how to hide/change a div via jQuery?
    – Dave
    Nov 18 '15 at 10:03
  • Yes because , in SharePoint 2010 Edit Form, i have to change some custom message instead of that error, using Content Editor Web Part, Please help me how to hide and that error and show our own message. Thanks for replying
    – user48602
    Nov 18 '15 at 10:24

You could use the same DIV to display your own error message:

$('#YOUR_DIV_ID').append('<span>Your new Error message</span>');

This deletes the content of the DIV and inserts your new message into it.

If you want to hide a div, simply use:






One way i can think, you can write a jquery which will check the visibility of the div tag. If it is visible replace the content of the div with your custom content.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.