Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- $(document).ready(function() {
- var soapEnv =
- "<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'>
- <soapenv:Body>
- <GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>
- <listName>Posts</listName>
- <viewName>{B9212691-1AF1-41AF-9DA7-6073ADDB091B}</viewName>
- <View>
- <Query>
- <OrderBy>
- <FieldRef Name='ID' Ascending='False' />
- </OrderBy>
- </Query>
- <RowLimit>1</RowLimit>
- </View>
- </GetListItems>
- </soapenv:Body>
- </soapenv:Envelope>";
- $.ajax({
- url: "_vti_bin/lists.asmx",
- type: "POST",
- dataType: "xml",
- data: soapEnv,
- complete: processResult,
- contentType: "text/xml; charset="utf-8""
- });
- });
- function processResult(xData, status) {
- $(xData.responseXML).find("z\:row").each(function() {
- var liHtml = "<li>" + $(this).attr("ows_ID") + "</li>";
- $("#tasksUL").append(liHtml);
- });
- }
- </script>
- <ul id="tasksUL"/>
- $(xData.responseXML).find("[nodeName='z:row']").each(function()
- $(document).ready(function() {
- var idquery="";
- $().SPServices({
- operation: "GetListItems",
- async: false,
- listName: "test",
- CAMLQuery: idquery,
- CAMLRowLimit: 1,
- completefunc: function (xData, Status)
- {
- $(xData.responseXML).SPFilterNode("z:row").each(function() { //alert($(this).attr("ows_Title"));
- var getvalue= parseInt($(this).attr("ows_Title"))+1;//Auto increment value $("input[title='TicketNumber']").val(getvalue);
- });
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement