|
|
|
|
![]() ![]() |
Mar 17 2007, 06:35 PM
Post
#1
|
|
|
Premium Member Group: Members Posts: 330 Joined: 2-February 06 Member No.: 11,040 |
Well Last night, after a week of irritation and errors I finally created an easy Javascript object that easily and quickly allows you to develop an AJAX program in just 5 easy steps!
Here's the link to the object I've created: http://www.demolaynyc.astahost.com/ajaxConn/ajaxConn.js Download it and read the Readme file that's under the same directory: http://www.demolaynyc.astahost.com/ajaxConn/Readme.html Basically what this object does is to connect to a server-side script (".php, .asp, .jsp, etc"), and what ever this script displays is sent back to the AJAX object and calls a function you designated and handles that response. (usually a string of codes, text or boolean) The steps are all in the Readme file I've provided. I hope you like it and find it useful. Please take note: This is for developers who have knowledge in Server-Side coding and Javascript. For questions or concerns or comments, please don't hesitate to post. |
|
|
|
Mar 18 2007, 05:28 AM
Post
#2
|
|
|
Member [ Level 2 ] Group: Members Posts: 71 Joined: 16-December 06 Member No.: 18,419 |
This seems pretty good. For my AJAX, I created a similar structure. My only suggestion for improvement would be to add additional functions to handle return values, instead of using getElementsByTagName or childNodes. Just a suggestion, but there's no need to do it because what you have is simple and functional, instead of complex.
|
|
|
|
Mar 18 2007, 10:01 AM
Post
#3
|
|
|
the Q Group: [HOSTED] Posts: 1,022 Joined: 13-July 05 From: Lithuania, Vilnius Member No.: 7,059 |
I think I will use it, as I am not really into javascript, I currently use something similar, but if you are posting it here, when I think your Object is much better, the only thing I am willing to know, if it is works under all these browsers? Opera, Firefox, IE and Safari, Konqueror?
|
|
|
|
Mar 18 2007, 01:35 PM
Post
#4
|
|
|
The Modernator Group: Members Posts: 486 Joined: 6-August 06 From: The Interweb! Member No.: 15,021 |
Notice from Mark420:
I have seen the same post here http://www.trap17.com/forums/index.php?sho...ve+Ajax+Program
Please dont do this again! the rules are you can have an account here and at Trap but you must NOT post the same posts in both forums |
|
|
|
Mar 19 2007, 05:44 PM
Post
#5
|
|
|
Premium Member Group: Members Posts: 330 Joined: 2-February 06 Member No.: 11,040 |
Sorry Mark420, I wasn't aware it was illegal. My sole purpose was to let everyone from both forum know about it. I won't do it again.
QUOTE I think I will use it, as I am not really into javascript, I currently use something similar, but if you are posting it here, when I think your Object is much better, the only thing I am willing to know, if it is works under all these browsers? Opera, Firefox, IE and Safari, Konqueror? Yep, there's a function that tries to create an XMLHTTP request object on all browsers such as Mozilla, IE, Opera, etc. I'm planning on adding "POST" method option to send the variables for added security. |
|
|
|
Mar 19 2007, 10:24 PM
Post
#6
|
|
|
The Modernator Group: Members Posts: 486 Joined: 6-August 06 From: The Interweb! Member No.: 15,021 |
No probs - if you didnt know,you didnt know
|
|
|
|
Apr 5 2007, 02:20 PM
Post
#7
|
|
|
Premium Member Group: Members Posts: 219 Joined: 13-February 07 Member No.: 20,371 |
This really seems like a nice little library thing....
What would be nice though, and I haven't seen much on it, is for error handling....shouldn't there be some sort of timeout, with a retry (in case somebody has a wireless connection or some other issue where the request gets lost)....I can't stand that when I am on all these websites that use ajax and my connection stops for a second and so the page is stuck on this little animated image thing that says something like "loading" or "sending"... |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 7th September 2008 - 04:05 AM |