I have a list and I would like to have a link on each item (dynamic) that I can click to insert some data to another list.

What I'm after is to get some data when a user clicks an item. (Kind of to track when they have read an item)

I have been trying to use SPServices but keep getting error.

i.replace is not a function
[Break On This Error]   


This is what i'm using:

<script type="text/javascript" src="/Jquery/jquery-1.6.2.min.js"></script>

<script type="text/javascript" src="/Jquery/jquery.SPServices-0.6.2.min.js"></script>

    $(document).ready(function() { 
CreateNewItem(subject, message); 

function CreateNewItem(subject, message) { 
 operation: "UpdateListItems", 
 async: false, 
 batchCmd: "New", 
 listName: "TheOtherLIST", 
 valuepairs: [["Title", subject], ["Message", message]], 
 completefunc: function(xData, Status) { 
  • I did get it working. But i can't insert dates.What format does it need to be to insert dates? Thanks in Advance – naijacoder Jan 12 '12 at 7:40
  • 1
    I believe using UTC time format is the preferred method, yyyy-mm-ddThh:mm:ssZ. – Eric Alexander Jan 12 '12 at 13:28
  • Thanks PirateEric This is what i'm trying to apss "2012-01-13T15:08:38Z" but its not working – naijacoder Jan 13 '12 at 4:09
  • Give this a shot to convert the dates: $().SPServices.SPConvertDateToISO(); spservices.codeplex.com/… – Darrell Lloyd Harvey May 2 '15 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.