This project has moved and is read-only. For the latest updates, please go here.

Can't Add New List Item, No response

Nov 16, 2010 at 11:02 PM
Edited Nov 16, 2010 at 11:03 PM

I borrowed the below code method from the documentation but cannot add a new list item, using SPServices. I have successfully gotten this to work with standard Jquery so this is really baffling as to why it won't work. I'm sure one of the experts can immediately spot my rookie error.

<script type="text/javascript" src=""></script>
<script type="text/javascript" src="http://xxx/sites/web/js/jquery.SPServices-0.5.7.js"></script>

         function CreateNewItem(subject, message) { 
          //Something inside here stops all responses, even a simple alert will not work
           operation: "UpdateListItems",
           async: false,
           batchCmd: "New",
           webURL: "";
           listName: "2011-UHN-Leadership-RSVP",
           valuepairs: [["Title", subject], ["Message", message]],

           completefunc: function(xData, Status) {

          $(document).ready(function() {
          $("#newTaskButton").click(function() {
           //var subject = $("#feedback-subject-input input").val();
           var message = "message";
           var subject = "subject";
           CreateNewItem(subject, message);  

<input id="newTaskButton" type="button"  style="vertical-align:middle;font-size:11px;font-family:verdana" name="Submit" value="Submit" />

Nov 17, 2010 at 12:50 AM
You've got a semi-colon instead of a comma after the value for webURL. ;-) M.
Nov 17, 2010 at 1:54 PM

Thanks Marc, I knew it was something small and probably elementary!

After a day of looking at code these things sit right in front of me invisibly....

Nov 17, 2010 at 2:00 PM

Hey, it happens to all of us!