CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   JavaScript frameworks (http://www.codingforums.com/forumdisplay.php?f=62)
-   -   MooTools Submit stop event (http://www.codingforums.com/showthread.php?t=286254)

shile 01-22-2013 09:23 PM

Submit stop event
 
well,i have this script that i have set up that on submit requests php file that is used to validate my input values...i have set up that when it is not validated the correct way to echo it is not validated,now i want in my request when i get response and it is the error response to stop the submit..here is the script,it does send the request and returns response but it doesnt stop the submit...

Code:

window.addEvent('domready', function(){
var form=document.adminForm;
form.addEvent('submit', function(e){


    var dataString="date=" + document.getElementById("date").value + "&start=" + document.getElementById("start").value + "&end=" + document.getElementById("end").value;
    var requestData = new Request ({
                url: '/provjera.php',
                method:'POST',
            async:false,
            evalResponse:true,
                data:dataString,
                onComplete: function(responseText){
                alert(responseText);
                if(responseText){}
                e.stop();

                }
            });

            requestData.send();

});


});



All times are GMT +1. The time now is 08:36 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.