locked
Retrieve meeting date from InstanceId in Meeting workspace page using ecmascript RRS feed

  • Question

  • Hi,

    I have a meeting workspace site. In the calendar list, i have a item created. Clicking on the Edit event, opens the edit page. Clicking on the workspace link, opens the workspace page with the date highlighted in the quick launch menu.

    In the workspace page, i have added a custom button - "Retrieve Date". I would like to pass the highlighted date which is shown in the left menu, InstanceId and the meeting workspace url to another custom list,which has the columns as "meeting id", "meeting date" , "meeting workspace url" .

    However in the url of the meeting workspace page, i can see only the below:

    http://site/MeetingWorkspace/default.aspx?InstanceID=7

    How to retrieve the highlighted "meeting date" , "meeting workspace url" and pass it to custom list in client object model(ecmascript)?

    Thank you


    • Edited by Venkatzeus Monday, August 27, 2012 8:15 AM
    Monday, August 27, 2012 5:36 AM

Answers

  • Hi Venkatzeus,

    To get the meeting date value and page url in the workspace page, you can use JavaScript code to achieve this, the date is shown in the page right beside the logo, or in the quick launch bar, the selected meeting has the date td with an image with the alt attribute: Selected Meeting, you can use this to specify the date value in the same tr of a table.

    Here is the code snippet to get the date value beside the page logo:
    <scripttype="text/javascript">

            setTimeout(function(){testCalendarDate();},500);

            function testCalendarDate() {

                var time = document.getElementById("MeetingDate").innerText;

                time = time.substring(5, time.indexOf('Time'));

                alert(time); 

            }

        </script>

    Thanks,


    Qiao Wei

    TechNet Community Support

    • Marked as answer by Lhan Han Friday, September 7, 2012 10:50 AM
    Monday, September 3, 2012 8:56 AM