V Posted June 23, 2010 Author Share Posted June 23, 2010 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 Quote Link to comment Share on other sites More sharing options...
F1Fan Posted June 23, 2010 Share Posted June 23, 2010 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...'; Quote Link to comment Share on other sites More sharing options...
trq Posted June 23, 2010 Share Posted June 23, 2010 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. Quote Link to comment Share on other sites More sharing options...
V Posted June 23, 2010 Author Share Posted June 23, 2010 @FIfan, thanks! I'll implement the code function. Yes, I tried waiting a long time but nothing happens. I have to click twice. Maybe I have to clean up the script. @thrope, I guess I should start learning more Jquery. Quote Link to comment Share on other sites More sharing options...
bluejay002 Posted June 23, 2010 Share Posted June 23, 2010 yep... jquery is pretty neat. though there are also alternatives like mootools. apart from that, jquery ajax is pretty, you can find it here: http://api.jquery.com/category/ajax/ hope this helps. bluejay, Quote Link to comment Share on other sites More sharing options...
V Posted June 23, 2010 Author Share Posted June 23, 2010 Thanks for the link bluejay002! I'll definitely have to spend at least a week learning all the Jquery basics. 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.