Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-22-2013, 09:23 PM   PM User | #1
shile
New Coder

 
Join Date: Oct 2012
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
shile is an unknown quantity at this point
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();

});


});
shile is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:24 AM.


Advertisement
Log in to turn off these ads.