Note that there are some explanatory texts on larger screens.

plurals
  1. POJQuery $.ajax doesn't return anything, but only in Google Chrome?
    primarykey
    data
    text
    <p>I'm hoping someone can help me with this as I'm at a loss. I'm trying to simply load a plain text file into a page at runtime using jquery- everything works fine in IE8 (8.0.7600.16385), Firefox 3.6.3, however in Google Chrome 5.0.375.55 the "data" comes back as nothing- i get an empty alert box.</p> <p>This is the code i'm using;</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;title&gt;Animation Test&lt;/title&gt; &lt;script type="text/javascript" language="javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" language="javascript"&gt; $(document).ready(function () { $.ajax({ url: 'level1.txt', success: function (data) { alert(data); }, async: true, type: 'GET' }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;canvas id="canvas" width="640" height="480"&gt; Unsupported Browser &lt;/canvas&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>The file I'm loading in is a plain text file containing this;</p> <pre><code>Central Cavern 100 O.........1.C....C...........1.O O................1.............O O..............................O O..............................O O......................B1..B...O O=============~~~~=~~~~========O O.............................1O O===...........................O O............A..OOO.B..........O O====...&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;...O O............................==O O..............................O O..........B........OOO.....===O O....===============...........O O%............................XO O==============================O </code></pre> <p>(Yes- it's the first level from Manic Miner! I'm making a javascript version using the html5 canvas to get my head around using it.)</p> <p>I'm at a total loss- it can't be the code because it runs in the other 2 browsers- is there an issue with jquery and this version of Chrome?</p> <p>Thanks for reading!!</p> <p>Shaw.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload