I am working on SharePoint RESTful API using JavaScript. when using _spPageContextInfo it doesn't work.
Error: Uncaught ReferenceError: _spPageContextInfo is not defined
here is code i used
<html xmlns="http://www.w3.org/1999/xhtml">
<script src="../Scripts/jquery-1.8.2.min.js"></script><script type="text/javascript"> $(document).ready(function () { $.getJSON(_spPageContextInfo.webServerRelativeUrl +"/_api/web/currentuser", function (data) { $("#message").text('hello'+ data.d.Title); }); });</script>
...