Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I solved this by creating a Fiddle in jsFiddle just for testing Ajax loads. It&rsquo;s some very simple HTML with an image and some copy &mdash; you can see it here:</p> <pre class="lang-html prettyprint-override"><code>&lt;div class="container"&gt; &lt;img id="picture" src="http://media.smashingmagazine.com/uploads/2012/01/best-of-no-150px.png" /&gt; &lt;p&gt;This post will help you get to know the iOS SDK a little better. It leads you through some choreographed steps of iOS app development, even if you have little or no programming knowledge. It covers some key principles and applies these directly to something useful and relevant: the creation of a simple but functioning portfolio app for the iPhone.&lt;/p&gt; &lt;div style="clear: both;"&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <pre class="lang-css prettyprint-override"><code>body { font-family: Arial; color: #333333; line-height: 1.4em; } img { margin: 0 0 1em 1em; padding: 1em; background: #ffffff; border: 1px solid #eaeaea; display: inline-block; float: right; -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; } .container { background: #fafafa; padding: 1em; } </code></pre> <p><a href="http://jsfiddle.net/deborah/pkmvD/" rel="nofollow">Demo on JS Fiddle</a>.</p> <p>If you use Firebug to click on the &ldquo;result&rdquo; frame, you can get the source URL of the iframe. When you copy this source URL into the Fiddle containing your Ajax request, it will work because now it is on the same domain. Here&rsquo;s a demonstration:</p> <pre class="lang-html prettyprint-override"><code>&lt;div class="excontainer"&gt; &lt;button id="loadbasic"&gt;basic load&lt;/button&gt; &lt;div id="result"&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <pre class="lang-css prettyprint-override"><code>body { font-family: Arial; } .excontainer { padding: 1em; } label { display: block; width: 100%; } p { padding: .5em; } a, a:visited { color: #2d9afd; } .changed { color: #ff0099; } .highlight { background: #faffda; } .entered { color: #f5560a; } .green { color: #7fbf38; } .hellomouse, .clickable, #foo, #event { cursor: pointer; } button { margin-bottom: 1em; } div { margin: 1em 0; } #foo { display: inline-block; } ul { margin: 1em 0; } .form, form, .stuff, .morestuff, stuff3 { margin: 1em 0; padding: 1em; background: #ececec; } input { font-size: 1.1em; padding: 2px; } .placeholder { color: #ff0099; font-weight: normal; } ::-webkit-input-placeholder { color: #cccccc; } :-moz-placeholder { color: #cccccc; } :-ms-input-placeholder { color: #cccccc; } :focus::-webkit-input-placeholder { color:transparent; } .content { margin-top: 5px; padding: 1em; background: #eeeeee; } </code></pre> <pre class="lang-js prettyprint-override"><code>// learn jquery ajax // http://net.tutsplus.com/tutorials/javascript-ajax/5-ways-to-make-ajax-calls-with-jquery/ // no need to specify document ready $(function(){ // don't cache ajax or content won't be fresh $.ajaxSetup ({ cache: false }); var ajax_load = "&lt;img src='http://automobiles.honda.com/images/current-offers/small-loading.gif' alt='loading...' /&gt;"; // load() functions var loadUrl = "http://fiddle.jshell.net/deborah/pkmvD/show/"; $("#loadbasic").click(function(){ $("#result").html(ajax_load).load(loadUrl); }); // end }); </code></pre> <p><a href="http://jsfiddle.net/deborah/Ln95K/31/" rel="nofollow">Demo on JS Fiddle</a>.</p>
    singulars
    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.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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