Advertisement

Responsive Advertisement

How to check if the page is in Edit Mode from JavaScript

This will help you to find out if a page is in Edit Mode from JavaScript

Place the below code in your Content Editor Web part

 



[code language="css"] var inDesignMode = document.forms[MSOWebPartPageFormName].MSOLayout_InDesignMode.value; if (inDesignMode == "1") { // page is in edit mode } else { // page is in browse mode }

Post a Comment

0 Comments