Why is this jquery script not working?
<p>So I have a website that allows a user to enter a link and it then extracts information and places it into a list for them.</p>

<p>Now everything was working fine until yesterday when my web hosting partner done some upgrades.  I know that mysql &amp; php have been upgrading but am not sure what else.</p>

<p>First I had issues that I could not log into the DB (had to drop and recreate users).
Then an issue with PHP serialise for JSON (needed a code change).
Then a 412 invalid precondition error (needed a special rule set up by the hosting partner).
And now last of all a jquery script has stopped working.  But I have no idea as to why.  It worked before, but maybe that was luck (I am not so experienced in this).</p>

<p>Anyway, what happens is</p>

<ol>
<li>User enters a link.</li>
<li>jquery calls a link which returns JSON.</li>
<li>The JSON is parsed and the web page updated with the results.</li>
<li>The user clicks on save and the data is entered into the DB.</li>
</ol>

<p>using firebug and placing alerts in my javascript then I can see that Step 1, step 2 work fine.  The JSON returned is valid (I have verfied it with JSONlint) but step 3 does not work.  My script is below;
<br></p>

<pre><code>function getURLData(form)
{
    var listid = $('input#listid').val();
    var memberid = $('input#memberid').val();
    var link = $('input#link').val();
    var sendstr = "http://www.wishindex.com/ajax.php?link=\"" + link + "\"&amp;listid=" + listid + "&amp;memberid=" + memberid;

alert(sendstr);
        $.getJSON(sendstr,function(result)
        {   
            alert('inside');        
            if(result['Itemname'] != "")
            {
                alert('inside2');
                $('#itemname').val(result['Itemname']);
                $('#itemname').attr('readonly', 'true');
                $('#desc').val(result['Description']);
                $('#category').val(result['Category']);
                $('#category').attr('readonly', 'true');
                $('#price').val(result['Price']);
                $('#price').attr('readonly', 'true');
                $('#choosepicture').attr('onclick', 'window.open(\'http://www.wishindex.com/picture.php?link=' + result['Link'] + '\')');
                if (result['PictureLink'] != "")
                {
                    $('#picturelink').val(result['PictureLink']);
                    $('#picturelink').attr('readonly', 'true');                 
                }
                else
                    $('#choosepicture').removeAttr('disabled');

                $('#automatic').attr('value', 'true');      
                $('#currency').val(result['Currency']);
                $('#currency').attr('readonly', 'true');
            }
            else
            {           
                $('#automatic').attr('value', 'false');
                $('#manual').html('Please enter details manually');
                $('#choosepicture').removeAttr('disabled');
                $('#choosepicture').attr('onclick', 'window.open(\'http://www.wishindex.com/picture.php?link=' + result['Link'] + '\')');
            }
        });
}
</code></pre>

<p>If I enable the alerts then I see the link called is correct, the JSON is valid (via firebug and calling the link manually) and that the alert('inside') &amp; alert('inside2') are executed so it is reaching this segment of the code, but my html elements are not updated!</p>

<p>As I said, before the upgrade it was fine,  but maybe I have done something wrong, so any help would be appreciated as I have spent hours on this and can't find the issue.</p>

<p>My JSON response;</p>

<pre><code>[{"ID":"","MemberID":"24","Listid":"41","Itemname":"LEGO Star Wars 9489: Endor Rebel Trooper and Imperial Trooper","Description":null,"NumberDesired":null,"NumberPurchased":null,"Category":{"0":"TOYS_AND_GAMES"},"Link":"\"http:\/\/www.amazon.co.uk\/LEGO-Star-Wars-9489-Imperial\/dp\/B005KISGAI\/ref=pd_rhf_gw_shvl1\"","PictureLink":{"0":"http:\/\/ecx.images-amazon.com\/images\/I\/51fQnt%2BlppL._SL160_.jpg"},"Price":"9.89","Currency":"\u00a3","Priority":null,"SuggestedPurchaser":null,"ActualPurchaser":null,"PurchaseStatus":null,"Productid":"B005KISGAI","Site":"amazon.co.uk","DateAdded":null,"DatePurchased":null,"Domain":null,"Temp":["LEGO-Star-Wars-9489-Imperial","dp","B005KISGAI","ref=pd_rhf_gw_shvl1\""],"Error":"","Warning":null}]
</code></pre>

<p>You can call this to get a JSON result example</p>

<p><a href="http://www.wishindex.com/ajax.php?link=%22http://www.amazon.co.uk/LEGO-Star-Wars-9489-Imperial/dp/B005KISGAI/ref=pd_rhf_gw_shvl1%22&amp;listid=41&amp;memberid=24" rel="nofollow">http://www.wishindex.com/ajax.php?link=%22http://www.amazon.co.uk/LEGO-Star-Wars-9489-Imperial/dp/B005KISGAI/ref=pd_rhf_gw_shvl1%22&amp;listid=41&amp;memberid=24</a></p>

<p>A working demo (as requested) can be found here;
<a href="http://www.wishindex.com/test_newitem.php?listid=41" rel="nofollow">http://www.wishindex.com/test_newitem.php?listid=41</a></p>

<p>To test;</p>

<ol>
<li>Enter a product link from amazon.co.uk such as
<a href="http://www.amazon.co.uk/LEGO-Star-Wars-9489-Imperial/dp/B005KISGAI/ref=pd_rhf_gw_shvl1" rel="nofollow">http://www.amazon.co.uk/LEGO-Star-Wars-9489-Imperial/dp/B005KISGAI/ref=pd_rhf_gw_shvl1</a>
into the link field</li>
<li>Click on get details and the rest of the fields should be populated
automatically, but t hey are not.</li>
</ol>
