O'Reilly logo

PHP Application Development with NetBeans Beginner's Guide by M A Hossain Tonu

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action — creating status poster using JQuery AJAX

We will create a post() method inside the status.js library, and bind the method with the click event on the Submit button. We will create the method by adding code lines one after another, as shown in the following steps:

  1. At our status.js library, type the following post() method, terminated with a comma, to add it inside the Status library:
    post: function () {
    var myname = 'M A Hossain Tonu', myimage = 'images/user/tonu.jpg';
    var loadingHtml = '<img src="images/ajaxload.gif" alt="loadin.." border="0" >';
    var successMsg = 'Status Posted Successfully ...';
    var statusTxt = $('#status_box').val(), postStatus = $('#postStatus');
    },
    

    At the variable declaration section, the myname and myimage ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required