Ajax
Ajax demo
docs referencesjs code | html code | css code
References to Documentation
$('start').addEvent('click', function(e) { e = new Event(e).stop(); var url = "/demos/Ajax/lipsum.html"; /** * The simple way for an Ajax request, use onRequest/onComplete/onFailure * to do add your own Ajax depended code. */ new Ajax(url, { method: 'get', update: $('log') }).request(); });
<h3>Simple Ajax Request</h3> <p><a id="start" href="#">Click here</a> to start Ajax request</p> <div id="log"> <p>Waiting...</p> </div>
#log { background: #f8f8f8; border: 1px solid #d6d6d6; border-left-color: #e4e4e4; border-top-color: #e4e4e4; padding: 0.3em; margin-top: 10px; } #start a { font-weight: bold; }