p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   BOOK: Beginning SharePoint 2013 Development (http://p2p.wrox.com/book-beginning-sharepoint-2013-development-727/)
-   -   Chapter 9 Problems (http://p2p.wrox.com/book-beginning-sharepoint-2013-development/91949-chapter-9-problems.html)

eyadams January 17th, 2014 07:48 PM

Chapter 9 Problems
Page 230 has the following code:

var clientContext = context = new SP.ClientContext.get_current();

This won't work. Get rid of the "= context".

But this really is just the tip of the iceberg with the Javascript problems. SP 2013 does all JavaScript "on demand", and as a result just about everything has to be run asynchronously. Wrap everything in a function, and then put the function at the end of a call to SP.SOD.executeFunc(). I'll elaborate more if anyone is interested.

All times are GMT -4. The time now is 02:26 PM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
2013 John Wiley & Sons, Inc.