Login   Register  
PHP Classes
elePHPant
Icontem

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of chandan Kumar  >  Alphabetical Search  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Alphabetical Search
Class: Alphabetical Search
Get list of database records to complete text
Author: By
Last change: Index page
Date: 2012-12-12 13:21
Size: 3,328 bytes
 

Contents

Class file image Download
<?php 
include('config.php'); 
include(
'ajaxFunction.php'); 
$list $objAjaxRequest->GetCompleteList(); 
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script language="javascript" src="jquery.js" type="text/javascript"></script>
<link rel="stylesheet" href="search.css" type="text/css" />
<script>
function getProdList(id)
{
    
    //alert(id); return false; 
    if(id !='')
    {
        $.ajax({
            type: "GET",
            url: "ajaxFunction.php", 
            data: "do=res&id="+id, 
            
             
            onLoading: function(){
                $('#alfaProdList').html('<div align="center"><img src="images/ajax-loader.gif" /></div>');
            },
            
            success: function(msg){
                
                //alert(msg); 
                $('#alfaProdList').html(msg);

            },
            error: function(){
                alert('some error has occured...');    
            },
            
            start: function(){
                alert('ajax has been started...');    
            }
      });
    }
}
</script>
</head>

<body class="main">
<div class="block-title-left"></div>
<div class="block-title-mid"><span>Alphabet Search</span></div>
<div class="block-title-right"></div>
<div class="clear"></div>


<div class="block base-mini alfasrch">
    <div class="block-content" >
        <div class="srchbox">
            <table width="100%" cellspacing="2" cellpadding="2" border="0" class="alfasrch">
            <tbody><tr>
                <td><a href="javascript:getProdList('A');">A</a></td>
                <td><a href="javascript:getProdList('B');">B</a></td>
                <td><a href="javascript:getProdList('C');">C</a></td>
                <td><a href="javascript:getProdList('D');">D</a></td>
                <td><a href="javascript:getProdList('E');">E</a></td>
                <td><a href="javascript:getProdList('F');">F</a></td>
                <td><a href="javascript:getProdList('G');">G</a></td>
                <td><a href="javascript:getProdList('H');">H</a></td>
                <td><a href="javascript:getProdList('I');">I</a></td>
            </tr>
            <tr>
                <td><a href="javascript:getProdList('J');">J</a></td>
                <td><a href="javascript:getProdList('K');">K</a></td>
                <td><a href="javascript:getProdList('L');">L</a></td>
                <td><a href="javascript:getProdList('M');">M</a></td>
                <td><a href="javascript:getProdList('N');">N</a></td>
                <td><a href="javascript:getProdList('O');">O</a></td>
                <td><a href="javascript:getProdList('P');">P</a></td>
                <td><a href="javascript:getProdList('Q');">Q</a></td>
                <td><a href="javascript:getProdList('R');">R</a></td>
            </tr>
            <tr>
                <td><a href="javascript:getProdList('S');">S</a></td>
                <td><a href="javascript:getProdList('T');">T</a></td>
                <td><a href="javascript:getProdList('U');">U</a></td>
                <td><a href="javascript:getProdList('V');">V</a></td>
                <td><a href="javascript:getProdList('W');">W</a></td>
                <td><a href="javascript:getProdList('X');">X</a></td>
                <td><a href="javascript:getProdList('Y');">Y</a></td>
                <td><a href="javascript:getProdList('Z');">Z</a></td>
                <td><a href="javascript:getProdList('#');">#</a></td>
            </tr>
            </tbody></table>
        </div>
        <div id="alfaProdList" class="rsltbox">
        <?php echo $list?>
        </div>
    </div>
</div>
    
</body>
</html>