denba 0 Report post Posted October 1, 2010 (edited) Using a form or specifics links, I can update the content of the div "mydiv" using an Ajax request (mootools 1.2) (var myRequest = new Request({...).The "imported" content looks like: <div id="div1">...</div><div id="div2">...</div>... Once my ajax call is done and completed (content of "mydiv" is replaced as expected) I would like to change some css properties of this "imported content (ie. add a top margin to div2).I tried to add toonComplete: function(response) { $('div1').setStyle('margin-top', '50px'); alert('Request completed successfully.'); } Nothing occurs but javascript error telling that element div1 is null.Am I missing something here or what should I do in order to be able to manipulate the "imported" data?Thanks in advance for your help.BM Edited June 20, 2012 by moderator (see edit history) Share this post Link to post Share on other sites