To communicate with SharePoint you need to use the JavaScript client object model as follows:
var ctx = new SP.ClientContext.get_current();
var web = ctx.get_web();
var listCollection = web.get_lists();
var list = listCollection.getByTitle(NameOfYourList);
var listItem = list.getItemById(TheItemID);
context.load(listItem);
context.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
and then
function onQuerySucceeded() {
var setTime = listItem.get_item('testval');
//continue your work
}
function onQueryFailed(sender, args) {
alert('failed');
}
Remember to reference SP.js script tag:
<SharePoint:ScriptLink Name="SP.js" runat="server" OnDemand="true" Localizable="false" ></SharePoint:ScriptLink>
testvalistestvalis a field in list it has a value of 15. i wantsetTimeto be 15!