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

I've very recently picked up SharePoint and have a limited knowledge of programming so you'll need to bear with me here.

I'm currently building on a development site collection in SharePoint Online (Office 365).

I've built a news ticker using HTML/jQuery which works using static values set in HTML. What I'm trying to do is link the ticker to a SharePoint List and have it scroll through the first five news titles.

Right now I have the following code in Default.aspx.

<%-- The markup and script in the following Content element will be placed in the <body> of the page --%>
<asp:Content ContentPlaceHolderID="PlaceHolderMain" runat="server">

    <div class="title"><p>On:trac News</p></div>
    <div class="cont"><ul id="ticker">
    <li>News item one.</li>
    <li>News item two.</li>
    </ul></div>        

</asp:Content>

This is then powered by the following jQuery.

<script type="text/javascript">
    $(document).ready(function () {
        function tick() {
            $('#ticker li:first').slideUp(function () { $(this).appendTo($('#ticker')).slideDown(); });
        }
        setInterval(function () { tick() }, 5000);
    });
</script> 

What is the best method of pulling information from SharePoint and then referencing the values in the default.aspx page? I have read around and found a couple of guides for pulling lists from SP but I'm struggling to find a way to write this to the ticker.

share|improve this question
    
We need o know the SharePoint version before we can really give you concrete advice. Is it 2007, 2010, or 2013? –  Robert Kaucher Sep 23 '13 at 16:26
    
Sorry, forgot to mention that. It's SharePoint Online (Office 365 deployment). –  Ben Short Sep 23 '13 at 22:27

1 Answer 1

You need to know how to use the Sharepoint client object model. Firstly, you have to get the SP Content -> SP List -> SP ListItems. Here is the complete basic operations using Javascript library code in SP. I think that will really helpful for you: http://msdn.microsoft.com/en-us/library/office/jj163201.aspx

share|improve this answer

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.