Getting iframe content with parseJSON
<pre><code>$("#x").load(function (){           
    var json = $.parseJSON($("#x").contents().text());
</code></pre>

<p>I also have a form that can be processed multiple times. The above code gets the content of the iframe the first time the form is processed but any times after that will result in a NULL.</p>

<p>I believe my problem is either the load function or the way I am setting the json variable from pulling the content out my iframe (#x).</p>

<p>Any help?</p>

<p>EDIT:</p>

<pre><code>var json = $(document).find('#x').contents().text();
</code></pre>

<p>The fix was to add $(document) to the string. However I'm not sure how to parseJSON it now?</p>

<p>EDIT FINAL TIME:</p>

<pre><code>var json = $(document).find('#x').contents().text();
var json = $.parseJSON( data );
</code></pre>

<p>Have it working with the above code. Thanks all. :)</p>
