How to copy a page( webpart page) with its content using client side.

How to copy a page(in my case  webpart page) with its content(it may contain webparts) using client code (i mean using SPservices or ECMA script).
What i am planning is ,to give end user a page where it will contain text box to specify  name of page and a button with the help of  content editor webpart.
where on click of button we need to write client side code such that it should create a new page from a existing page in a library with given name by user.
Any suggestion would be helpful. For your information we can do it through UI with the help Site Actions / Manage Content and Structure.But i want to automate it using client side code.Server side code is restricted.
or can we create a template of an existing page with content without the help of sharepoint designer.
Thanks in advance
with regards Ravichandra

This is good example
http://balajiindia.wordpress.com/2011/05/27/using-jquery-with-custom-web-services-in-sharepoint/
Create web service
http://balajiindia.wordpress.com/2011/05/27/using-jquery-with-custom-web-services-in-sharepoint/. Create method "Create Page" http://www.learningsharepoint.com/2010/09/17/create-publishing-pages-sharepoint-2010-programmatically/
Build your Java Script. You can use Content Editor Web Part if you want to avoid custom web part development http://www.codeproject.com/Articles/544538/JQuery-with-SharePoint
Oleg

Similar Messages

  • How to copy paste a new page with thumbnails view in Pages 5?

    How to copy paste a new page with thumbnails view in Pages 5?

    Feature removed along with over 90 others:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=b14426a2c5af2 65f2213d98ee45f08d7&mforum=iworktipsntrick
    Pages '09 should still be in your Applications/iWork folder.
    Export your Pages 5 files to Pages '09 or Word .docx and trash/archive Pages 5.
    Then rate/review Pages 5 in the App Store.
    Peter

  • I need to know how to copy pictures to a cd with the captions showing, elements 8 and windows 7

    I need to know how to copy
    pictures to a cd with the captions showing, elements 8, windows 7

    Here are some suggestions.  Perhaps others will have even better ideas.
    1 -- for viewing on a Windows computer,  you can experiment with making a PSE Organizer slide show creation in which you specify to show the captions. Then save the Output of the slide show as a WMV file that the recipient could play on a computer with Windows Media Player.
    If you have a DVD burner on your PC, you can also use that WMV file as input to the Windows 7 DVD Maker program for making a TV playable DVD. And if your recipient(s) who will view on a computer have DVD readers, you could make video DVDs playable on computers or TV DVD players instead of using CDs.
    The limitations of this approach are that this wmv file you create is really a video file so
    -- it advances photo slides at the rate specified when you create the slide show
    -- the choices to save a wmv file are not very high resolution so that recipients who have high resolution monitors will not see the photo images are not getting the benefit of seeing the photos at their best
    -- your recipients can't print from this video slide show
    2 An entirely different approach is to
    -- For each individual photo, make a copy of the photo file and depending on how high resolution your originals you might want to resize down to monitor viewing sizes.
    -- Then use the PSE Editor Text Tool to place the caption on a layer above the photo. (I think that you could display the existing caption and then do a copy and paste so that you don't need to retype everything.)
    -- You should save this photo copy with the text as a uniquely named JPEG file. Use the file names to control the sequence in which you want the viewer to see the photos.  (Don't save as a PSD because others probably can't read the PSD format).
    -- Then use your computers CD burning software to burn a folder containing all those jpeg files with the captions to CD
    This approach is a bit of work for each photo and you did not say how many photo files you will be doing. However,
    -- computer users should be able to display  the jpegs as high resolution photos on their computer as well as optionally print from those photo files
    -- many TV DVD players can play (display) jpg files from a CD disc which also gives recipients the opportunity to view the photos on their larger TV screen
    Process 2 may seem complicated but once you get started I think it will be more of a production line.
    ADDITION
    Do you have any portrait orientation photos included with those you wish to send ? If yes, we might need to discuss some additional processing for them.

  • How to copy List item from one list to another using SPD workflow using HTTP call web service

    Hi,
    How to copy List item from one list to another using SPD workflow using HTTP call web service.
    Both the Lists are in different Web applications.
    Regards, Shreyas R S

    Hi Shreyas,
    From your post, it seems that you are using SharePoint 2013 workflow platform in SPD.
    If that is the case, we can use Call HTTP web service action to get the item data, but we cannot use Call HTTP web service to create a new item in the list in another web application with these data.
    As my test, we would get Unauthorized error when using Call HTTP web service action to create a new item in a list in another web application.
    So I recommend to achieve this goal programmatically.
    More references:
    https://msdn.microsoft.com/en-us/library/office/jj164022.aspx
    https://msdn.microsoft.com/en-us/library/office/dn292552.aspx?f=255&MSPPError=-2147217396
    Thanks,
    Victoria
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to copy and paste a photo in another folder using Aperture?

    How to copy and paste a photo in another folder using Aperture?

    What do you want to achieve? Do you really want to create a copy of an image, and thus create a second copy of the master image file? You will waste disk space this way.
    Usually you would create new versions of an image, if you want versions with different adjustments. Versions do not require much additional disk space. But all versions of an  image have to be in the same project. To create a new version: Main menu bar -> Photos -> Duplicate Version
    To create a copy of an image in another project (and to waste the space ) drag the image to another project while holding down the option key. This will create a copy in the other project.
    Sofar nobody here could come up with a good reason why one would want to create a copy. I am curious what in your workflow requires you to do that. Would you mind to tell us?
    Regards
    Léonie

  • How do I fill an Excel spreadsheet with the contents of a DataTable? (C#, OleDb)

    The following fills a DataTable with the contents of an Excel spreadsheet.
        oledbCmd.CommandText = "SELECT * FROM [" + stSheetName + "$]";
        DataTable dtDataTable = new DataTable();
        using (OleDbDataAdapter oledbAdapter = new OleDbDataAdapter(oledbCmd))
        oledbAdapter.Fill(dtDataTable);
    How do I fill an Excel spreadsheet with the contents of a DataTable?
    bhs67

    You can try this Excel library, it can help u to
    export datatable to excel to Database.
    After add the reference to your project ,add the following code:
    private void button1_Click(object sender, EventArgs e)
    //connect database
    OleDbConnection connection = new OleDbConnection();
    connection.ConnectionString @"Provider=""Microsoft.Jet.OLEDB.4.0"";Data Source=""demo.mdb"";User Id=;Password="
    OleDbCommand command = new OleDbCommand();
    command.CommandText = "select * from parts";
    DataSet dataSet = new System.Data.DataSet();
    OleDbDataAdapter dataAdapter = new OleDbDataAdapter(command.CommandText,connection);
    dataAdapter.Fill(dataSet);
    DataTable t = dataSet.Tables[0];
    //export datatable to excel
    Workbook book = new Workbook();
    Worksheet sheet = book.Worksheets[0];
    sheet.InsertDataTable(t, true, 1, 1);
    book.SaveToFile("insertTableToExcel.xls");
    System.Diagnostics.Process.Start("insertTableToExcel.xls");
    http://www.e-iceblue.com/Tutorials/Spire.XLS/Spire.XLS-Program-Guide/Data-Export-/Import-Export-Datatable-to-Excel-from-Database.html

  • How to check for a function module with its description and functionality

    Hi all,
    How to check for a function module,with its description and its functionality,in detail how can I know the purpose of a particular function module,how to search for a function module which suits my requirement .

    Hi,
    You can search a FM of your requirement by putting in the Key words and searching for a FM. Like * KEYWORD * and then pressing F4.
    Say for example you need to search something regarding converstion.
    Search for * CONVERT * and press F4.
    If there is something specfic like converting date to something you can give
    DATE * CONVERT *
    OR
    CONVERT * DATE *  and press F4.
    Once you narrow down your search you will have a Function module documentation inside the Function module. Please note that all the FMs willl not have documentation.
    Regards,
    Pramod

  • How to get string from jtextpane along with its attributes

    sir,
    How to get string from jtextpane along with its attributes
    i,e font,size,style,color etc.
    please help me out.
    my mail id is [email protected]

    JTextPane extends JTextComponent
    JTextComponent.getDocument()
    a Document is a set of Element, see Document.getRootElements(). Each Element has attributes, stored within an AttributSet object see Element.getAttributes()
    a Document can also be rendered as a String, see Document.getText( offest, length ), use it with 0 and Document.getLength() as parameters.

  • How can I set up iCloud sync with Outlook 2007 using Hotmail account?

    Hi,
    I installed iCloud PC control panel. I tried to sync my contacts and calendars from Outlook (2007) to the cloud but I gets this message: "Add an e-mail account to Outlook Before setting up iCloud". I have an Hotmail account synced up into my Outlook via Outlook Connector. Can iCloud sync with Hotmail accounts?
    What should I do to get my calendars and contacts synchronize to the cloud. Does Outlook 2007 can be synced by the cloud too?
    How can I set up iCloud sync with Outlook 2007 using Hotmail account?

    I found a way to fix this, it did the trick for me:
    https://discussions.apple.com/thread/3109623
    All you have to do is include a new e-mail account [email protected] (set it as a default) on Outlook with the options that are showed in the thread I linked and you should have the calendars and tasks syncronised. It works perfectly with ipod touch, ipad and Outlook 2010 on windows 7.

  • Copy one list items new list using client side object model

    Hi,
    I have a requirement like i need to copy one list information to new list with createdby and modified by fields.I need to use client side object model code.Can u please send me the code sample.
    Regards,
    Praveen

    Hi,
    According to your post, my understanding is that you want to copy one list items new list using client side object model.
    You can use console application.
    Here is a similar thread for your reference:
    https://social.technet.microsoft.com/Forums/sharepoint/en-US/28a43891-7505-4d34-b513-fdd66773c2a3/copy-list-item-to-another-list-using-client-object-model-in-console-application?forum=sharepointdevelopmentprevious
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Document Creation error - "We're sorry. We can't open document name because we found a problem with its contents"

    Morning Friends,
    I have created a SharePoint 2010 "Site Workflow" that is designed to take information from a form and create a Word doc with the gathered information and store this Word doc in a document library.
    I am using Sharepoint 2013 with Office 2013 
    I understand there are a lot of steps (19) outlined below and I can provide more information as needed but the bottom line is this, workflow successfully takes info from an initiation form, uses the info to create a Word doc. Places this Word doc in a library.
    When attempting to open / edit doc, receive error
    "We're sorry. We can't open <document name> because we found a problem with its contents"
    Details - No error detail available.
    Any info or advice would be greatly appreciated. 
    Very high level view of what I have done:
    1 - Created content type called "Letters"
    2 - Added site columns " First Name" and "Last Name"
    3 -  Created and saved to my desktop a very basic Word document (Letter.docx) that says "Hello, my name is XXXX XXXX"
    4 - In the advanced settings of the "Letters" content type I uploaded this "Letter.docx" file as the new document template.
    5 - Created a new document library called "Letters"
    6 - In Library Settings - Advanced Settings, clicked "Yes" to enable the management of content types.
    7 - Then I clicked "Add from existing content types" and added the "Letters" content type
    8 - Back in the advanced settings of the "Letters" content type I selected "Edit Template" and replaced the first XXXX with the Quick Part "First Name" and the second XXXX with the Quick part "Last Name"
    9 - Created a new 2010 Site workflow called "Create a Letter"
    10 - To the workflow I added the action "Create List Item"
    11 - Configured the action to create Content Type ID "Letters" in the document library "Letter" 
    12 - For the "Path and Name" I gave it a basic name of "Letter to"
    13 - The next step was to create the Initiation Form Parameters and added to form entries "First Name" and "Last Name"
    14 - I then linked the initiation form fields to the data source "Workflow Variables and Parameters" to their respective Field from Source parameters
    15 - Went back to the "Path and Name" and modified the basic name of "Letter to" to include the first and last name parameters.
    16 - Saved - published and ran the work flow.
    17 - As expected, Initiation Form prompts for First and Last Name. ("John Doe") Then click "start
    18 - Go to document library "Letters" and see a new Word document created titles "Letter to John Doe" 
    19 - Go to open / edit the Word document and receive the following error
    thoughts? Any info or advice would be greatly appreciated. 

    See this MS support article for SP2010 workflows and generating Word docs:
    https://support.microsoft.com/kb/2889634/en-us?wa=wsignin1.0
    "This behavior is by design. The Create
    List Item action in the SharePoint
    2010 Workflow platform can't convert Word content type file templates to the correct .docx format."
    I've had success in using SP 2013, Word 2013 (saving a .docx as the template instead of .dotx for the document library content type), and an SP 2010 workflow using SP Designer 2013.

  • Mozilla, facebook and other sites. content of page is centered with blank borders on either side.

    various web pages(mozilla.com, facebook) appear as follows. web content is centered in middle of browser page leaving a large blank border on each side. background graphics take up whole browser window, but not content.
    == This happened ==
    Every time Firefox opened
    == i just got a new tower. downloaded fresh mozilla.

    Hi Hindhaughlee, <br />Thanks for the post.
    This may not be the best place to post such a solution but maybe some users will find it. If it turns out to be a major problem with a simple solution maybe we will manage to document it somewhere.
    Are you able to provide more details please:
    * exactly what software and software versions is the problem with ? <br /> You appear to be a Windows 8 user, but presumably the Kaspersky software may be applicable to other Windows versions, which Kaspersky software is this tested with ?
    * What is he exact error message or warning that Kaspersky generates in this situation ?
    * is the problem documented elsewhere, preferably in a public open site, if so maybe you could provide a link
    * can you detail simple but exact detailed Steps To Reproduce that will enable others to test out this problem and solution.
    Cheers
    John <br /> <sub>One of the forum moderators J99<sub>
    P.S. <br />
    Anyone with this problem finding that the solution works may wish to vote for this thread and solution. Or if someone else can produce links to examples of this or you are able to give precise Steps To Reproduce please add a post of your own.

  • How can I update a Site Column with the content of an array with javascript CSOM?

    I'm relative new to Sharepoint 2013, I'm trying to update the content of a Site column with the content of an array, I can retrieve and visualize the content of my site column, the user is able to change and save the necessary part and the changes are
    saved into an array, now I have to update the content of the site column with the content of the array, but for some kind of reasons I can't accomplish that, any suggestion/example? This is my code so far to retrieve, visualize the site column and store the
    mofication into my array.
        <body>
                <select id="dropdown" name="dropdown" onchange="optSelect()">
                    <option value="EngineType_Cylinders">EngineType_Cylinders</option>
                    <option value="EngineType_EngineCycle">EngineType_EngineCycle</option>
                    <option value="EngineType_EngineFamily">EngineType_EngineFamily</option>
                    <option value="EngineType_Euro">EngineType_Euro</option>
                    <option value="EngineType_FamilyEvolution">EngineType_FamilyEvolution</option>
                    <option value="EngineType_GasEmissionLevel">EngineType_GasEmissionLevel</option>
                    <option value="EngineType_Power">EngineType_Power</option>
                    <option value="EngineType_PowerSupply">EngineType_PowerSupply</option>
                    <option value="EngineType_Use">EngineType_Use</option>
                </select><br />
                <textarea id="textareadisplay" rows="25" cols="23"></textarea><br />
                <input type ="button" value="Update values" onclick="addItemsToColumns()" />
            </body>
    My Javascript
        $(function () {
            SP.SOD.executeOrDelayUntilScriptLoaded(Function.createDelegate(this, function () {
               var select = document.getElementById('dropdown').value;
                console.log(select);
                getSiteColumns(select);
            }), 'SP.js');
        var fieldChoice;
        var choices;
        var addFields = [];
        var slc;
        var clientContext;
        function optSelect() {
            slc = document.getElementById('dropdown').value;
            getSiteColumns(slc);
        function getSiteColumns(selection) {
           clientContext = SP.ClientContext.get_current();
            if (clientContext != undefined && clientContext != null) {
                var web = clientContext.get_web();
                fieldChoice = clientContext.castTo(web.get_availableFields().getByTitle(selection), SP.FieldChoice);
                clientContext.load(this.fieldChoice);
                clientContext.executeQueryAsync(Function.createDelegate(this, this.OnLoadSuccess), Function.createDelegate(this, this.OnLoadFailed));
        function OnLoadSuccess(sender, args) {
            choices = fieldChoice.get_choices();
            var textarea = document.getElementById("textareadisplay");
            textarea.value = choices.join("\n");
        function OnLoadFailed(sender, args) {
            alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
        function addItemsToColumns() {
            clientC = SP.ClientContext.get_current();
            var arrayForUpdate = $('#textareadisplay').val().split('\n');
            fieldChoice.set_item(, arrayForUpdate);
            fieldChoice.update();
            clientContext.executeQueryAsync(function () { }, function () { });
        function OnUpdateSuccess(sender, args) {
            var newchoices = fieldChoice.get_choices();
    My problem is on the function addItemsToColumns() please help! Thanks in advance.

    Let's look at your stylesheet -
    <style type="text/css">
    body {
    background-image: url(assets/images/Business%20Men%20In%20Reception%20Col.2.jpg);
    background-repeat: no-repeat;
    background-color: #003;
    margin-left:auto;
    margin-right:auto;
    position: relative;
    width: 960px;
    It's a good idea not to use spaces or any punctuation in your filenames when working for the web.
    #header {
    margin-left:auto;
    margin-right:auto;
    position: relative;
    width: 960px;
    #heading {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 36px;
    font-style: italic;
    font-variant: normal;
    margin-left:auto;
    margin-right:auto;
    There's no need to specify the default values (font-variant:normal) or to specify auto margins for any block element without an explicitly defined width. And wouldn't it make more sense to put the font style on the body tag, where it will inherit into the rest of the page than to restate it as you have done in the next rule?
    #bodytext {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 18px;
    line-height: 25px;
    font-variant: normal;
    width: 300px;
    #container {
    width: 960px;
    position: relative;
    margin-left:auto;
    margin-right:auto;
    .rightimg {
    float: right;
    margin-left: auto;
    padding-right: 40px;
    #heading #navbar ul li {
    padding: 30px;
    </style>
    Margin-left:auto can't work without knowing what the width of the element is....  Keep your CSS lean and targeted - it will help you to debug your layouts.

  • How to generate a report in Excel with multiple sheets using oracle10g

    Hi,
    I need a small help...
    we are using Oracle 10g...
    How to generate a report in Excel with multiple sheets.
    Thanks in advance.
    Regards,
    Ram

    Thanks Denis.
    I am using Oraclereports 10g version, i know desformat=spreadsheet will create single worksheet with out pagination, but my requirment is like the output should be generated in .xls file, and each worksheet will have both data and graphs.
    rdf paperlayout format will not workout for generating multiple worksheets.
    Is it possible to create multiple worksheets by using .jsp weblayout(web source) in oracle reports10g. If possible please provide me some examples
    Regards,
    Ram

  • How can I replace my iTunes Library with the contents of my iPod, including the playlists?

    I tried transferring the purchases, but it didn't move my playlists over. I have also tried backing my old library up to a disc, and putting it in my new computer, but it still didn't transfer my playlists.
    Is there any way I can transfer my old itunes library from my old computer to my new computer, including the playlists?
    I have heard people talk about replacing itunes with the contents of the ipod, but I'm not sure how to do it.

    check out this post by Zevoneer.
    if you have an iPod Touch, there are PhoneView and iRip.
    as for playlists, check out the posts by Chris CA in this discussion.

Maybe you are looking for

  • E66 How do I email using WiFi instead of GPRS?

    Hi, this is probably a really simple question. How do I get my E66 to connect to my mail server using a WIFI network, and not the default GPRS network? Thanks in advance (p.s. love this phone ) Message Edited by opplevelse on 30-Oct-2008 12:25 PM Sol

  • My laptop has been fatally injured - how do I move iTunes to another computer without losing everything?

    My laptop has died and I now have a replacement.  I have my iPhone and the kids' iPods.  How can I set up iTunes on the new laptop without losing everything from the devices?  Or can't I?  Hilary

  • Find ECC idoc using PI message

    Hi all, I have PI messages. To find respective ECC idoc, 1) i am going inside a message in SXMB_MONI. 2)Going to Call Adapter step. 3)In the SOAPHeader, there is a sub step called "IdocOutbound". There, i have idoc number. Further, i am trying to fin

  • Safari quits unexpectedly when closing a browser window

    When I close a browser window I receive an unexpected closure error message. The details of the error report are below. Has anyone else experienced the same issue or know how to correct it? Thanks! Date/Time: 2009-11-26 13:20:26.684 -0800 OS Version:

  • Flash Preloader not working anymore

    The final and most crucial part to completing a project I have is the preloader. When I first developed this, the preloader worked fine. a 1.7MB file later, it shows a blank screen, and then the preloader shows 100% and the page loads. I was given ad