Note that there are some explanatory texts on larger screens.

plurals
  1. POAjax request using mootools not working
    primarykey
    data
    text
    <p>I try loading content into a div with <a href="http://www.trap17.com/index.php/Mootools-12-Ajax-Request_t64355.html" rel="nofollow noreferrer">this</a> tutorial. Unfortunately, this simply loads the HTML file as a new page.</p> <p>This is the javascript that should do the job</p> <pre><code>window.addEvent('domready', function() {      $('runAjax').addEvent('click', function(event) {          event.stop();          var req = new Request({              method: 'get',              url: $('runAjax').get('href'),              data: { 'do' : '1' },              onRequest: function() { alert('The request has been made, please wait until it has finished.'); },   onComplete: function(response) { alert('Response received.); $('container').set('html', response); }          }).send(); $('runAjax').removeEvent('click');      }); }); </code></pre> <p>this is the link that should initiate the function</p> <pre><code>&lt;a href="about.html" id="runAjax" class="panel"&gt;Profil&lt;/a&gt; </code></pre> <p>and this is the div-structure of index.html. i want the content to be loaded into the "container"-div</p> <pre><code>&lt;div id="view"&gt; &lt;div id="sidebar"&gt; mib &lt;/div&gt; &lt;div id="container"&gt; &lt;div id="logo"&gt; &lt;!--img src="img/logo.png"--&gt; &lt;/div&gt; &lt;div align="center" id="tagline"&gt; content &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>I dont really care what script i use as long as its compatible with MooTools 1.2, because i need it for a sliding top panel and it would be a lot more work to change it to a jquery panel for example.</p>
    singulars
    1. This table or related slice is empty.
    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.
    1. This table or related slice is empty.
    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