scarface222 wrote:Thanks man but is there a way to get it to work with the
# success: function(){
# $('form#submit').hide();
# startCountDown(15, 1000, myFunction);
# $('#countDown').fadeIn();
# setTimeout(function(){
# $('form#submit').fadeIn();
# }, 15000);}
it only works if i delete that and sub your line. Also is there a way to only get it to pop up when the 15 second error comes. I tried using this: function(text) {text}
and deleting the <script> tags in my processing document because I thought it would just sub that code in that space when the error returned then make the window pop up.
You're not quite understanding... that's OK though, as you're at least trying.
# success: function(){
# $('form#submit').hide();
# startCountDown(15, 1000, myFunction);
# $('#countDown').fadeIn();
# setTimeout(function(){
# $('form#submit').fadeIn();
# }, 15000);
I would do something along the lines of:
success: function(response) {
if(response == "OK") {
// do your countdown etc stuff.
} else {
alert("error occurred. here it is: " + response);
}
}
Of course, that is a hacked together method and you really should look into JSON from PHP for anything more complex. Your script would have to print "OK" (and only that) in order for the response to contain "OK"... etc etc.