Jump to content

[SOLVED] ajax problems!


dennismonsewicz

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

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.