Jump to content

Mootools 1.1 question


dennismonsewicz

Recommended Posts

I am having to develop an AJAX request application in Mootools 1.1 because of our legacy systems and am having some problems with my code

 

<script type="text/javascript" src="/media/system/js/mootools.js"></script>

<script type="text/javascript">
window.addEvent('domready', function() {
	$('click').addEvent('click', function(e) {
		e = new Event(e).stop();

		var input = $('test').value;
		var url = "http://www.myurl.com/test.php?mdn="+input;

		var ajax = new Ajax(url, {
			method: 'get',
			update: $('log')
		}).request();
	});
});
</script>

<input type="text" name="test" id="test" />

<p>
<a href="#" id="click">Click Me!</a>
</p>

<p id="log"></p>

 

When I run this code and click the link nothing happens... no error message, nothing... any ideas why?

 

I tried searching for some mootools 1.1 demos/docs and found demos111.mootools.com, and followed their tutorial line for line but cannot get my code to run...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.