Mootools AJAX problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • agam
    New Member
    • Jan 2011
    • 21

    Mootools AJAX problem

    I have created this code but it won't work, why?
    HTML:
    Code:
    	<!-- JavaScript Includes -->
        <script src="mt1.2.4.c.js"></script>
    	<script src="check.js"> </script>
    </head>
    
    <body>
    	<article>	
    	<form id="go">
    		<input type="email" id="emailF" placeholder="yourEmail@domain.com" />
    		<input type="submit" value="Go" id="start" />
    	</form>
    	<div id="log">
    	</div>
        </article>
    JS:

    Code:
    window.addEvent('domready', function(){
    		$('go').addEvent('submit', function(es){
    			es.stop();
    			new Request.HTML({
    			url:'/check.php',
    			update:$('log')
    			}).post($('go'));
    
    		});
    	});
    php:

    Code:
    	<?php
    echo 'Hello!';
    ?>
    Why isn't it responding?
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    I've not really worked with Mootools, but check the docs. Try setting the response to a variable and checking the contents of the variable. What response do you get?

    Comment

    Working...