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 ↓</div>';
for ($i=$start; $i<$finish; $i++) {
echo '<div class="data">'.$data[$i]['post'].'</div>';
}
} else {
echo 'stop';
}
exit;
}
?>