Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Nothing easier than that man. Try this one:</p> <pre><code>&lt;?xml version="1.0" encoding="iso-8859-1"?&gt; &lt;html&gt; &lt;head&gt; &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css" type="text/css" /&gt; &lt;script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/jquery-ui.min.js"&gt;&lt;/script&gt; &lt;style&gt; .loading { background: url(/img/spinner.gif) center no-repeat !important} &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;a class="ajax" href="http://www.google.com"&gt; Open as dialog &lt;/a&gt; &lt;script type="text/javascript"&gt; $(function (){ $('a.ajax').click(function() { var url = this.href; // show a spinner or something via css var dialog = $('&lt;div style="display:none" class="loading"&gt;&lt;/div&gt;').appendTo('body'); // open the dialog dialog.dialog({ // add a close listener to prevent adding multiple divs to the document close: function(event, ui) { // remove div with all data and events dialog.remove(); }, modal: true }); // load remote content dialog.load( url, {}, // omit this param object to issue a GET request instead a POST request, otherwise you may provide post parameters within the object function (responseText, textStatus, XMLHttpRequest) { // remove the loading class dialog.removeClass('loading'); } ); //prevent the browser to follow the link return false; }); }); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Note that you can't load remote from local, so you'll have to upload this to a server or whatever. Also note that you can't load from foreign domains, so you should replace href of the link to a document hosted on the same domain (and <a href="http://jquery-howto.blogspot.com/2009/04/cross-domain-ajax-querying-with-jquery.html" rel="noreferrer">here's the workaround</a>).</p> <p>Cheers</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.
    3. VO
      singulars
      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