SP.ClientContext.get_current() returning undefined objects
<p>I am trying to get some information about the current context through the sharepoint javascript object model and am getting annoying errors.</p>

<pre><code>$(document).ready(function () { ExecuteOrDelayUntilScriptLoaded(loadConstants, "sp.js"); });

function loadConstants() {

var ctx = new SP.ClientContext.get_current();

var site = ctx.get_site();
IPC_siteUrl = site.get_url();
IPC_siteId = site.get_id();

var web = ctx.get_web();
}
</code></pre>

<p>This is what im calling in a javascript file in our core javascript file, and when i try to call "ctx.get_site()" I am getting errors through the dev console on ie8.</p>

<p>The property or field has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.</p>

<p>Im not sure why this is happening as im following Microsofts directions.</p>

<p>Any thoughts?</p>
