I have to fetch data using javascript client object model and for that i have to use Sharepoint Designer 2010 only i have searched on google and there i got solution only by adding code in visual web part. So can any tell me how i can use javascript client object mode to retrieve data in sharepoint designer 2010?
|
Here take a look at this. I completely deleted my original answer. Now below make sure in your script type that it is just like below.
Make sure you have the libraries loaded. Look here http://msdn.microsoft.com/en-us/library/ee535709.aspx http://msdn.microsoft.com/en-us/library/hh185009.aspx First link is how to setup your application page the second link is how to perform a simple list lookup function. |
|||||||||||||||||||||
|
Think of the visual web part as a container. You can implement this code in a couple different ways using only SPD:
|
|||||||||||||
|
|
|||||||||||||
|
Working code for ecmascript just add the content place holder ..through web part than. click on edit this webpart than make sure that u have selected the content place holder and click on edit source..and it should be empty if you have selected any other web part it will show you some div etc... so make sure that you have selected the content place holder..and just copy the below code there... and if you want to change the list name..than u can change it here listCreationInfo.set_title('CustomList'); Steps: 1. add a page in sharepoint site. 2. add a web part(content place holder) 3. click on edit this web part 4. now click on edit source make sure..(Add web content is clicked) it will show you the dotted line that your content editor is selected.(you can check it by clicking on select button on a format toolbar(right side) it will show you which box is selected. 5. click on Edit Source. 6.Copy the code. 7. Happy Coding :)
|
|||
|