Jump to content
xisto Community

denba

Members
  • Content Count

    1
  • Joined

  • Last visited

  1. 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 to onComplete: 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
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.