I have a list in sharepoint. One column is a choice box for pending, approved, denied. I need to create a method to approve all on the click of a button. I cant figure out how because it doesnt represent to the browser itself as a choice box. Its all in a table inside the cell. See the code below.
<div id="jsgrid_combobox" class="combobox-placeholder" style="position:absolute; visibility: inherit; border: 0px; top: 33px; left: 64px; direction: ltr; min-width: 115px; width: 115px; height: 29px; background-color: transparent;"><input type="text" class="cb-textbox " dir="ltr" style="height: 25px; width: 82px;"><input type="button" class="combobox-img" value="▼" tabindex="-1" title="Dropdown" dir="ltr" style="height: 29px;"><div class="combobox-dropdown" style="visibility: hidden; z-index: 0; max-width: 200px; margin-left: 0px; top: 1px; display: none;"><div class="combobox-tablewrapper" style="height: 100px;"><table cellspacing="0" cellpadding="0" class="combobox-panel-table"><tbody><tr class="cb-dp-rw"><td><div></div></td><td style="border-right-width: 0px;"><div class="cb-dp-rw-selected"><div style="white-space: nowrap; padding: 4px;"><span title="Pending" class="jsgrid-control-text">Pending</span></div></div></td></tr><tr class="cb-dp-rw"><td><div></div></td><td style="border-right-width: 0px;"><div class=""><div style="white-space: nowrap; padding: 4px;"><span title="Approved" class="jsgrid-control-text">Approved</span></div></div></td></tr><tr class="cb-dp-rw"><td><div></div></td><td style="border-right-width: 0px;"><div><div style="white-space: nowrap; padding: 4px;"><span title="Rejected" class="jsgrid-control-text">Rejected</span></div></div></td></tr><tr class="cb-dp-rw"><td><div></div></td><td style="border-right-width: 0px;"><div><div style="white-space: nowrap; padding: 4px;"><span title="Additional Info Needed" class="jsgrid-control-text">Additional Info Needed</span></div></div></td></tr></tbody></table></div><a href="#" dir="ltr" class="combobox-link">Edit List Items</a></div></div>
List URL: Expense%20Reports%20v2/Manager.aspx#InplviewHash5fa282cd-555d-4129-9b53- 726afb8b5ac8=ShowInGrid%3DTrue
so i would get for a name of the list of "Expense Reports v2" if i am doing it correctly. I am assuming i can ignore all the other stuff after like the /Manager.aspx etc.
Below is the code i am trying to use as directed, but its not working. All the variables remain undefined throughout its execution.
$().SPServices.SPUpdateMultipleListItems({
listName: "Expense Reports v2",
CAMLQuery: "<Query><OrderBy><FieldRef Name='Approval_' /></OrderBy</Query>",
batchCmd: "Update",
valuepairs: [["Approval_x0020_Status", "Approved"]]
});