Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

This saves a page you're editing in SharePoint:

<a href="javascript:ChangeLayoutMode(null,true);">Save</a>

What are the names of the two parameters to this method? More important, what do they change about the method's behavior?

If you can, please cite a source.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

This method actually calls _MSOLayout_ChangeLayoutMode declared in IE55UP.js. Signature for the method:

function _MSOLayout_ChangeLayoutMode(bPersonalView, bExitDesignMode) {...}

So, the first bool parameter indicates if you want to switch to personal view, and the second indicates that you want to exit from design mode.
Usually, this method used like follows:

-Switch to edit mode(none pesonal view):

ChangeLayoutMode(false);

-Exit from edit mode:

ChangeLayoutMode(null,true);

Take a look at this method in IE55UP.debug.js for better understanding.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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