Jul 20, 2008

Ajax: Achieve Ajax Program In 5 Lines Of Code!

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > Java, Java Servlets, Java Script, & JSP

free web hosting

Ajax: Achieve Ajax Program In 5 Lines Of Code!

masugidsk8r
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.

 

 

 


Reply

jopak134
your link is not working is there an update to it? i would like to know how you did it.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : ajax achieve ajax program lines code

  1. Auto Run Java Program - Run Java program on double click (11)
    Some of the installables in java comes in form of .jar file, one has to just double click or type
    "java -jar file.jar", and it starts executing. The reason for this is a line appended in the
    MANIFEST.MF file of that jar file. For writing a similar jar file of your own, just write your java
    file, then compile the same and create a jar file. Create a MANIFEST.MF file and the content should
    have the followings: CODE Manifest-Version: 1.0 Created-By: xyz Main-Class:
    xyz.MainClass Here xyz.MainClass is the main class. Now create a jar file with the man...
  2. Java Script Drop Down Menu With Css - - a full code for a dynamic drop down (2)
    Introduction This is a code that I use to dynamically create the drop down menus. First, you have
    to edit the following code and put it in your Javascript. Notice : /*** SET BUTTON'S FOLDER HERE
    ***/. Edit that to your folder. Also, the /*** SET BUTTONS' FILENAMES HERE ***/. This creates a
    mouseover when the drop down is activated. Put all your onmouseover images under: oversources = new
    array; and your onmouseout images under : upsources. Be sure to set your on and out images above
    each other. CODE /*** SET BUTTON'S FOLDER HERE ***/ var buttonFold...
  3. Java Basic Program Guidance - (6)
    aving some problems taking in the Java at Uni, Was wondering if anyone could shine some light on it
    for me. My task is to write a program that will ask you to enter 2 words. the program will then
    print out both words on one line. However the words will be seperated by dots that will make the
    total length of the line 40. so if your first word was turtle and the second was abc, the output
    would be turtle...............................abc The program should check for certain conditions:
    1. a word can not be longer than 37 characters; 2. there must always be atlest 2 do...
  4. Eclipse Exporting .jar Files - Could not find main class. Program will exit. (4)
    I need help! I've been using eclipse for a while making little applets, and now I've
    decided to look at some tutorials on how to make simple applications. I've found a pretty good
    tutorial that tells you how to make a helloWorld app with swt and jFace, and also has an example
    file explorer that you can make. They both work perfectly from inside eclipse, but when I try and
    export either one into a .jar file, they don't work anymore. It comes up with a message saying
    "Could not find main class. Program will exit." In the little wizard it has for...
  5. Ajax Request Messing Up Format - need help to figure out a better way to do this. (1)
  6. Ajax Code Need Help Debugging. - (9)
    I did a tutorial on ajax started to write my own It was all working well under safari but when i
    tried to test it out on other broswers it doesnt seem to work at all. I've spend a few hours
    already going over it and cant seem to figure it out at this stage. Heres the code that works under
    safari function createRequestObject(){ var request_o; //declare the variable to hold the object.
    var browser = navigator.appName; //find the browser name if(browser == "Microsoft Internet
    Explorer"){ /* Create the object using MSIE's method */ request_o = new ActiveXObj...
  7. Concerns On Ajax With Java - (3)
    Source article from Sun: http://java.sun.com/developer/technicalArticles/J2EE/AJAX/ Well, from
    this article, it shows that Ajax can be achieved with Java using Java Servlets or JSP's. For
    those who don't know what AJAX is, it's an object in Javascript technology that allows for
    instant communication between client-side and server-side. It's like changing a page's
    content without having to reload the whole page. Let's move on... Now when I looked at the JSP
    source code, the servlet's function was to simply validate a text and send back a r...
  8. Remote Ajax - Wtf?! (1)
    Any reason why Ajax doesn't work remotely? It looks almost as if ajax only works if its getting
    or sending info from the same server. What gives? could this have anything to do with the possible
    abuse of brute force scripts? If so, wouldn't this be a limitation in the browser only? Are
    there any browsers that allow remote Ajax? ...or am I doing something wrong? (I left that question
    at the end for a reason... I am sure that my script is flawless seeing as it works perfectly if i
    try to access something locally, but the second I try something remote, no info ...
  9. Scripting Help On Ajax Shoutbox - (1)
    HI, I'm currently working on an AJAX web app. It's a shoutbox. I have here attached the .js
    file fully documented so it's easy to understand. Problem: An error message alert occurs in IE
    6 Help: I need someone who can fix a code so that the error won't show up in IE. Note: I've
    tested it under Firefox and Opera and it works very well. Here's the code: /** * ezShout -
    AJAX/PHP ShoutBox * by Albert Villaroman * * For help and tutorials on usage, please refer to
    manual * * Note: Due to JS lack of standard OOP conventions, treat "Shoutbox...
  10. Help With Ajax - I can't figure it out... (0)
    Hello, I have recentlty ran into a problem on my website : When a user logs in, it adds him to an
    active users list in the MySQL database, but if they don't click the "logout" button, and just
    leave the site, it keeps them in the active users list forever until I manually go into the database
    and take them out. I heard from a friend that you could use AJAX to find out if the user is active,
    if he's not and he stays inactive for a certain amount of time, then it will take him out of the
    active users list. So I go to learn AJAX because all of the other languages I...
  11. Ajax Web Apps - (0)
    Well I just finished learning AJAX and want to start an AJAX web application. the thing is that I
    don't know what kind of application I want to work on so I'm asking you guys to come up
    with one that will use HTML, CSS, Javascript and PHP. Nothing too big but nothing to small as well.
    I'm starting a small ShoutBox. I want a type of application that would be used by companies. I
    have a software in mind where companies like Fast Food restaurants could install on their websites
    and have customers easily make orders while employees will see incoming orders live...
  12. Ajax And Php - question (9)
    Hi Dears i want learn Ajax , i know PHP and mysql , i want include ajax interface into my php
    projects . but i can not find tutorial about ajax in pixel2life.com or google. i need good tut about
    begin ajax and how its work and more samples to use if you have good link about ajax plz post here
    And if you about ajax software kit plz post here thanks /smile.gif" style="vertical-align:middle"
    emoid=":)" border="0" alt="smile.gif" /> ...
  13. Help Writing An Html Code (onclick Open Something) - (5)
    hi, I am new in web development i want to make a page in which there are few buttons and on click
    of each button there is some hidden text field which becomes visible and user can enter the text he
    wish to in it. how can i ?...
  14. How Do I Create An Array Of Objects? - The code in the tutorial I have read returns an error upon compilation (3)
    I want to create an array of type Cards. Is this the right way of doing it? CODE Card
    decker[]; decker = new Card[5]; I always get the error DeckofCards: java:47:
    missing return statement whenever I compile this....
  15. My Code Does Not Connect To Database - always databases (1)
    Hi everyone! i am having
    a database connection problem, i am using this code to connet
    to the database -
    *******************attempCounter = 0****
    CODE public static Connection getDbConnection(String p_db, String p_schema) {
    Connection conn = null; int attemptCounter = 0; while (conn==null && atte...
  16. Countdown Code Help - I need help setting an image as the background. (3)
    Ok, now for scripts like this i am not to well of working with..and i am in need of a bit of help, i
    would like to set a background image as the background not a color... CODE <script
    language="JavaScript1.2"> /* Dynamic countdown Script- © Dynamic Drive
    (www.dynamicdrive.com) For full source code, 100's more DHTML scripts, and TOS, visit
    http://www.dynamicdrive.com */ function setcountdown(theyear,themonth,theday){
    yr=theyear;mo=themonth;da=theday } //////////CONFIGURE THE COUNTDOWN SCRIPT HERE//////////////////
    //STEP 1&...
  17. Fire Effect Code - (0)
    Here's a good Fire code:- -easy to install -super small -lag free(in most browsers) -great
    look/effect! Here's the image, it goes upwards... So basically, your forum would have
    these fire images flying from bottom to the top. It is lag free, simple, looks great and best of
    all, it takes very less space in ur wrapper... All you have to do is simply put this code in your
    site in tags... <script language="JavaScript1.2"
    src='http://tapsha6.mybesthost.com/fire.js'> That's it!!!All
    done!! Code From:- htt...
  18. Picture Enlargement - javascript code (2)
    ok i have alot of pictures on my site and i need a way in which i can hold my mouse over the
    pictures and the picture can get bigger. I know it will be some kind of javascript or flash trick
    can anyone explain the prosess for it?...
  19. Ajax Shoutbox For Ipb - Beta 2 Release - (4)
    Hi guys, Here's one of our preview releases of the projects going on under Antilost - an AJAX
    based ULTRA-LIGHT (only 20KB) Shoutbox, that works extremely fast and without refreshing your whole
    page. Can be easily integrated into IPB - although full integration module not ready yet. A
    demonstration can be found at: http://www.antilost.com/community/ Keep in mind that this is a
    develpomental release and is not completed yet. As we finish more and more of the coding part, the
    subsequent releases will be readily made availabel for download. So make sure you keep c...
  20. Ajax - Anybody else using it? (14)
    Hi everybody, I'm starting to use AJAX (Asynchronous Javascript And Xml), and it is quite nice
    and very cool. I was just wondering if anyone else is using it here yet?? Thanks! ...
  21. Is There A Way To Use Command Prompt Commands? - To make a program execute cmd stuff (4)
    I looked in the System class because that would make the most sense, but I didn't see anything.
    In C++ it's system(stuff) in stdlib.h. Just looking for something like that....
  22. Having Trouble Getting Program To Print Out Multip - (4)
    i'm trying to have a user input a number between 1 to 5, and that number will be the number of
    times the program will print out random 10 digit integers. Example, if user inputs 3, then the
    program will print out 3 random 10 digit intergers. Here's what i have so far Code: CODE
    import java.util.Scanner; import java.util.Random; public class test3 { public static void main
    (String[] args) {  Scanner scan = new Scanner(System.in);  Random
    generator = new Random();  int n=0, times;  String number = "";    Syste...
  23. Image Show With Thumbnail And Fade - Does anyone know were I can get this code? (2)
    Hi I would like to know if anyone knows a javascript that makes an thumbnail 'slideshow'
    and when mouseover...it fades...and when you click...it enlarges!!! I saw it somewhere
    here on the net but i cant finf it anymore!!! Can anyone help me...or does anyone know
    a good javascript site???? THANKS ...
  24. How To Insert Code With Javascript - How to insert into a div an amount of code (7)
    Hi, I have the next html page CODE <html> <head> <script> <!--
    function insertcode() { var code ="<p> blablabal babala
    babababab</p><h1>here comes header</h1><span>fadfafa<a
    href=\"fadfaf\">anchor</a>blalbababa</span>" var myText =
    document.createTextNode(code);
    document.getElementById("content").appendChild(myText); } -->
    </script> </head> <body> <div id="content">...
  25. Practice More Important To Study A Program Lanuage - The way to learn a program language (1)
    I had studied the c++ for long time before I got a program work. The books about c++ is seen by me
    again and again. But at that time I wasn't able to do any big program by c++. Though I knew all
    the syntax of c++. It was very terrible. I felt it was very diffcult as a programmer. Now I am a
    excellent programmer, I have written lots of jave code. Some of them is very difficult, for example:
    Workflow Engine. Now I know why I am not able to write a big c++ program but I know all the syntax
    of c++. Use a sentence to express: "Practice more important to study a program ...
  26. Eror 404 For Trap17 - The Code is Pretty Nice! (5)
    OpaQue, where did you get that JavaScript for the error 404 page for Trap17? It's something
    I've looked for for a long time! I 've tried before, but couldn't achieve the typing
    effect with JavaScript. I'd be very happy if you could tell me where you got it. /wink.gif'
    border='0' style='vertical-align:middle' alt='wink.gif' /> ...
  27. Hammurapi - Java Code Review Tool (0)
    hi friends, I came across another useful tool, Hammurapi. It is a code review tool for Java. It
    parses thru java source files and generates a report stating all the violations to the standards.
    It is very much customizable so that u can define ur standards and it will report. It can be found
    at www.hammurapi.org It can also be called from an ant build file. I feel it wud be very useful
    for java projects and to maintain coding standards....



Looking for ajax, achieve, ajax, program, 5, lines, code

Searching Video's for ajax, achieve, ajax, program, 5, lines, code
advertisement



Ajax: Achieve Ajax Program In 5 Lines Of Code!



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE