Jump to content

My first simple Ajax powered comment system - doesn't work :(


V

Recommended Posts

Hmm well each script does something else. Plus I wouldn't know how to combine the Jquery effect with the Ajax part. Ultimately I sort of prefer just Ajax because I understand how everything works. Aside from the comment system I was able to make something with Ajax on my own without the use of tutorials. I wouldn't have figured it out with Jquery unless I copied a finished script. With Jquery all the back-end stuff are hidden. I may be wrong.. I'm still new to JavaScript but I like to stick with what makes sense

As far as having to click the button twice, are you positive? Have you tried clicking the button one time and waiting a long time? Maybe it is working the first time.

 

I think a callback function is a good idea. Use it to empty all the input fields when the Ajax is complete. Also, it would be a good idea to do something that would notify the user that the script is running. Here's a REALLY simple example of something, but you could easily do something better. This will just give you the idea. Just put this at the beginning of your loadXMLDoc() JS function.

document.getElementById('myDiv').innerHTML += '<br \><br \>Loading...';

I may be wrong.. I'm still new to JavaScript but I like to stick with what makes sense

 

While I agree with you in theory, the best thing about using a framework is you don't need to know the ins and outs of what goes on behind he scenes, you only need to know the frameworks API. jQuery makes Ajax and dom manipulation an absolute breeze. All the hard work & cross browser stuff is all taken care of.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.