dennismonsewicz Posted March 26, 2009 Share Posted March 26, 2009 So I am updating a particular div in a module (I am using Joomla!) by replacing that div with another module.. My problem: The entire template is loading into the div and not just the contents of the module code: <script type='text/javascript'> window.addEvent('domready', function() { /* ajax replace element text */ $('materialLink').addEvent('click', function(e) { e = new Event(e).stop(); var url = "/sprint-reference-materials?tmpl=component"; new Ajax(url, { method: 'get', update: $('replacement') }).request(); }); }); </script> Link to comment https://forums.phpfreaks.com/topic/151260-solved-ajax-problems/ Share on other sites More sharing options...
Floydian Posted March 27, 2009 Share Posted March 27, 2009 How does your template decide what to output? From the looks of your code, the crux of the problem lies in the template itself. Link to comment https://forums.phpfreaks.com/topic/151260-solved-ajax-problems/#findComment-794860 Share on other sites More sharing options...
dennismonsewicz Posted March 27, 2009 Author Share Posted March 27, 2009 yeah I was able to figure out the problem... There is a bit of Joomla! code that you can inject in the template file itself to strip out JS files... so I am stripping out the native Mootools 1.1 and calling 1.2 in the actual module I need it to load Link to comment https://forums.phpfreaks.com/topic/151260-solved-ajax-problems/#findComment-795435 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.