Posts Tagged "ajax"

Tools for Analyzing AJAX Request on Popular Web Browser (Except IE)

July 15th, 2010 by aditia rahman / 1 Comment  

     

When you working in a web application project with rich client feature for example like using full Extjs component, you must be dealing with a lot Ajax request,  you must be want to know what the server response so in local development in different kind of web browser I always using these tools.

Firefox
You can use firebug for firefox addons for seeing ajax request that sent to server and see the server response, the advantage using firebug than the webkit inspect element is you can see the server response as a simple text or as an html, but on my firefox sometimes it got some error (nothing wrong with the server but server response not displaying on firebug). After you installing firebug restart the firefox and click on the firebug icon on the right bottom.

10 Jquery Ajax File Uploader Plugins

June 29th, 2010 by aditia rahman / 8 Comments  

     

Creating ajax upload from a raw javascript or jquery is not that simple, when baking a simple website, I personally will use available plugin, so it can save me much time and effort, we have to thank that there a lot of developer out there that share their great works.

01. Plupload

pupload example screen

Load Content Scroll Using EXT Core and PHP

June 22nd, 2010 by aditia rahman / No Comments  

     

Extcore is one the Extjs product, but the company name now called sencha, read this why extjs changes their name. If you using full stack Extjs source the Extcore must be included in the source, in this post I want to show how to load content while window scroll from the server using Extcore, this feature maybe useful when users want to see more data than visible on the screen maybe like facebook wall, actually this post is similar to another post i found, but using jquery (they are in 9lessons.info and webresourcesdepot.com), in this example i’m just using one file and the data is hardcoded from array

So lets start, here’s the php code

<?php

$data = array(
    0 => array('post' => 'Post Number 0')
);

for ($i=1; $i<=50; $i++) {
    $tmp_data = array(
        $i => array('post' => 'Post Number ' . $i)
    );
    $data = array_merge($data, $tmp_data);
}

// get next 10 row data,
if (isset($_GET['act'])) {
    $start = ($_GET['page'] * 10) + 1;
    $finish = $start + 10;
    if ($finish <= count($data)) {
        echo '<div class="data newhead">Loaded Data &darr;</div>';
        for ($i=$start; $i<$finish; $i++) {
            echo '<div class="data">'.$data[$i]['post'].'</div>';
        }
    } else {
        echo 'stop';
    }
    exit;
}

?>