jQuery post to PHP not returning full result
<p>I have tried to find a solution, but coming up blank.
My page requires a swapout of information when a link is selected.
Basicaly you select an item of choice, then the main div is swaped out with a form and data regarding your selection.</p>

<p>I already have a functioning page setup for this, but as it is all in PHP, the page reloads completely each time. This is not good for some selections as there is a full refresh of the link section as well ( which can be quite long depending on member ). So reload time can be a little long on some accounts, that is why I am opting for the jQuery swapout.</p>

<p>This is my jQuery script.</p>

<pre><code>        function swapContent(cv) {
        $("#input").html('&lt;img src="28.gif"/&gt;').show();
             var url = "scripts/run.php";
             $.post(url, {contentVar: cv} ,function(data) {
             $("#input").html(data).show();
              });
         }
</code></pre>

<p>PHP is simple "echo" return of value.</p>

<pre><code>if ($contentVar == true) {
echo $resultLoad;
} 
</code></pre>

<p><strong>$resultLoad;</strong> is the completed variable that is created in the PHP script.
All looks good and seems to work on most things, but I am having a little problem with the "echo" outputing all its info.</p>

<p>If I add a second "echo", befor or after the if statement ( or even a second inside it as well ), the first echo will always have half the info displayed and the rest display fine.</p>

<p>It is not a timing isue as I have tried timers in jQuery and PHP to allow data completion with no affect.</p>

<p>If you want to see it for yourself, you can go to the <a href="http://www.youtubetutsite.com/thumb_selectTEST.php" rel="nofollow">test page</a> ( but you need to be a loggedIn member with a YouTube account with uploads in it ) 
Dont worry.... Free site :)</p>

<p>But if you dont have one, then here is a <a href="http://www.youtubetutsite.com/graphics/screenCap.jpg" rel="nofollow">screen capture</a> for example.</p>

<p>=======================================================================</p>

<p><strong>EDIT:</strong></p>

<p>@Rusty Jeans ( and anyone else ) I have a large script that runs in PHP.
In PHP, I have a function that reads a YouTube streem for a given members account.
I then pars out the reletive info that is required which is suplied in an SXML format from the YT server. I then do a check to see if I have that particular video already in the system. 
All this works fine. Problem comes from the last part that writes out a HTML form and displays it.</p>

<pre><code>          include_once "dropdown_java.php";


          $resultLoad = $dropdown_java.'
          &lt;table width="455" border="0"&gt;
           &lt;tr&gt;
            &lt;td&gt;
            &lt;p&gt;&lt;div class="thumbnail"&gt;&lt;a href="' . $href . '\" target="_blank"&gt;
              &lt;img src="' . $thumb . '" width="120" height="90" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;
              &lt;p&gt;&lt;b&gt;&lt;u&gt;VideoId:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt; ' . $vid . '&lt;/p&gt;
                 &lt;p&gt;&lt;b&gt;&lt;u&gt;Video Title:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt; ' . $vidtitle . '&lt;/p&gt; &lt;p&gt;&lt;b&gt;&lt;u&gt;Video Discription:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt; ' . $vidDiscript . '&lt;/p&gt;
             &lt;/td&gt;
                 &lt;/tr&gt;
                &lt;/table&gt;   

                  &lt;form action="php_uploader.php" method="post" enctype="multipart/form-data" name="myform" id="dataInput"&gt;
              &lt;span class="alignRt"&gt;&lt;b&gt;&lt;u&gt;Area Of Interest:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
                &lt;select name="Area_Of_Interest" size="1" id="Area_Of_Interest"
                    onchange="setOptions(document.myform.Area_Of_Interest.options[document.myform.Area_Of_Interest.selectedIndex].value);"&gt;
                        '.$first_option_dropdown.'
                    &lt;/select&gt;&lt;br /&gt;&lt;br /&gt;
            &lt;span class="alignRt"&gt;&lt;b&gt;&lt;u&gt;Category:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
                    &lt;select name="Category" id="Category" size="1"&gt;
                    &lt;option value="" selected="selected"&gt;&lt;/option&gt;
                &lt;/select&gt;

         &lt;/span&gt;&lt;/p&gt;


               &lt;p&gt;&lt;span class="alignRt"&gt;&lt;b&gt;&lt;u&gt;Difficulty:&lt;/u&gt;&lt;/b&gt;
               &lt;input name="Difficulty" type="text" class="formFields" id="Difficulty" size="1" maxlength="1" /&gt;
               &lt;font size="-1" &gt;Difficulty out of 5 [ 1: Easy - 5: Hard ]    &lt;/font&gt;&lt;/span&gt;
          &lt;p&gt;
             &lt;/p&gt;&lt;font size="-1" &gt;Please supply a zip file with the learning material for the tutorial&lt;/p&gt;&lt;/font&gt;

              &lt;font size="2"&gt;&lt;b&gt;Choose your file here: &lt;/b&gt;&lt;/font&gt;&lt;a href="#" onclick="MM_popupMsg(\'Only .zip format will be uploaded.\rAnything else will be converted to a .zip and be unreadable.\')"&gt;
         &lt;font size="1" style="cursor: help" color="#00CCFF"&gt;&lt;b&gt;(?)&lt;/b&gt;&lt;/font&gt;&lt;/a&gt;
    &lt;input name="zipFile" type="file" class="formFields" id="zipFile" style="border-style: none; color: white; background-color: #000; border-style: solid; border-color: white; border-width: 1px;"/&gt;&lt;br /&gt;&lt;br /&gt;
       &lt;br /&gt;
                      &lt;input name="Submit3" type="submit" onclick="MM_validateForm(\'youtube\',\'\',\'R\',\'Video_Title\',\'\',\'R\',\'VideoID\',\'\',\'R\',\'Video_Discription\',\'\',\'R\',\'Area_Of_Interest\',\'\',\'R\',\'Category\',\'\',\'R\',\'Difficulty\',\'\',\'RinRange1:5\');
           return document.MM_returnValue" value="Submit Form" /&gt;&lt;/form&gt;
          &lt;/p&gt;';
</code></pre>

<p>If you notice as well, I have a javascript in the form for the dropdown lists.</p>

<p>For some reason the first table and the "dropdown java" chunck is omited in the first pass of the echo's. I did join them as well as a test, but still NO.</p>

<p>===============================================================</p>

<p>UPDATE :</p>

<p>==========</p>

<p>After some research and playing around, I have found out two things.
Firstly, it seems that the javascript in the php is the cause some how. Might be wrong, but does seem that way. ( my untrained eye )</p>

<p>Secondly, I have found that it works on GoogleChroma and FireFox just fine. Only IE is acting up. I am testing on IE8.</p>

<p>I hope that someone can help with this or has had a similar problem in the past that was solved.</p>
