hatefulcrawdad Posted December 21, 2009 Author Share Posted December 21, 2009 in your php file change all occurrences of this <div class="email-err"> to this <div class="email-err" id="email-err"> your response handler should be the following function handleResponse() { if(http.readyState == 4){ var response = http.responseText; $('contact-content').set('html',response+$('contact-content').get('html')); $('email-err').fade('out'); } } I think that should work if you do everything right wow, your good. it worked alright but I would like it to stay for a couple second, then fade out. Also, the space for it stays after it faded away. Is there a way to add something that makes it go to display:none; or somethign after it fades? Sorry if Im buggin you, but i really am learning from all this. it is making me seriously want to dedicate some time to learn these programming languages. Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted December 21, 2009 Share Posted December 21, 2009 change this $('email-err').fade('out'); to setTimeout(function() { $('email-err').fade('out');}, 5000); will fadeout after 5 seconds Quote Link to comment Share on other sites More sharing options...
hatefulcrawdad Posted December 21, 2009 Author Share Posted December 21, 2009 change this $('email-err').fade('out'); to setTimeout(function() { $('email-err').fade('out');}, 5000); will fadeout after 5 seconds awesome, now i gotta figure out how to get rid of the space created by the div. some kind of function that sets the display to none of that div after it fades out. ill search google, but if you have the time and know how, let me know. Quote Link to comment Share on other sites More sharing options...
hatefulcrawdad Posted December 21, 2009 Author Share Posted December 21, 2009 awesome! I think i did it by myself! I used the following handleResponse function handleResponse() { if(http.readyState == 4){ var response = http.responseText; $('contact-content').set('html',response+$('contact-content').get('html')); setTimeout(function() { $('email-err').fade('out');}, 2000); setTimeout(function() { $('email-err').setStyle('display', 'none');}, 2500); } } Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted December 21, 2009 Share Posted December 21, 2009 yes even better remove the node itself function handleResponse() { if(http.readyState == 4){ var response = http.responseText; $('contact-content').set('html',response+$('contact-content').get('html')); setTimeout(function() { $('email-err').fade('out');}, 2000); setTimeout(function() { $('email-err').destroy();}, 2500); } } Quote Link to comment Share on other sites More sharing options...
hatefulcrawdad Posted December 21, 2009 Author Share Posted December 21, 2009 yes even better remove the node itself function handleResponse() { if(http.readyState == 4){ var response = http.responseText; $('contact-content').set('html',response+$('contact-content').get('html')); setTimeout(function() { $('email-err').fade('out');}, 2000); setTimeout(function() { $('email-err').destroy();}, 2500); } } i just tested in IE 8 and it doesn't work. The form still puts the info in the URL, do you have any idea why it would do that? Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted December 21, 2009 Share Posted December 21, 2009 there are some errors on the page document.form.send not found you can see in Tools->Developer Tools in IE 8 to locate the problem also you should check your ajax code for cross browser compatibility Quote Link to comment Share on other sites More sharing options...
hatefulcrawdad Posted December 21, 2009 Author Share Posted December 21, 2009 there are some errors on the page document.form.send not found you can see in Tools->Developer Tools in IE 8 to locate the problem also you should check your ajax code for cross browser compatibility woot woot! its all good now. Thank you so much man for all your help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.