AJAX JQUERY RELATED:- How to call ajax on a ajax loaded page

后端 未结 3 1233
甜味超标
甜味超标 2021-01-27 03:09

Assume I\'m calling search through AJAX. Now I want to call another AJAX on the page that will be loaded by AJAX and can be edited.



        
3条回答
  •  礼貌的吻别
    2021-01-27 03:56

    PHP page of my application in this live search with pagination i am applied

    
    
    
    
    
    
    
    " onUnload="msg()" bgcolor="#CCCCCC">
            
    Search Record By Name )"/> Insert Record

    and this is my Handlerpage.php

    0)
            {
            $pages=ceil($n/3);
    
            $i=0;
    
            echo "
    Pages : "; while($i<$pages) { echo ""; $i=$i+1; } echo "
    "; } else { echo "No Record Found"; } } //============================================Selected record Display By Button======================================== //==========================================Display Record for static Record========================================== function disp_Record($btn) { $cn=mysql_connect("localhost","root",""); mysql_select_db("per_info",$cn); //$btn=1; $query="SELECT u.p_id 'ID', u.p_name 'NAME', u.p_add 'ADDRESS', l1.loc_name 'CITY', l2.loc_name 'STATE',u.p_gen 'GENDER', u.p_photo 'PIC', u.p_phone 'PH' FROM p_info u, tbl_state l1, tbl_state l2 WHERE u.p_city = l1.loc_id AND l2.loc_id = l1.loc_parent ORDER BY u.p_id desc LIMIT ".$btn.", 3"; $rs = mysql_query($query); echo ""; while($row=mysql_fetch_array($rs)) { echo ""; echo ""; } } //==========================================================Live search By Button===================================== function live_search_pages() { $txt=$_GET['txt']; $cn=mysql_connect("localhost","root",""); mysql_select_db("per_info",$cn); $query="SELECT count(*) 'TR' from p_info where p_name like '".$txt."%'"; $rs = mysql_query($query); $rec = mysql_fetch_array($rs); $n=$rec['TR']; if($n>0) { $pages=ceil($n/3); $i=0; echo "
    Name Address City State Gender Photo Phone No
    ".$row['NAME']." ".$row['ADDRESS']." ".$row['CITY']." ".$row['STATE']." ";if($row['GENDER']=="1") { echo "Male"; } else { echo "Female"; } echo " \"Pulpit ".$row['PH']."
    Pages : "; while($i<$pages) { echo ""; $i=$i+1; } echo "
    "; } else { echo "No record Found"; } } //================================================================Live search========================================== function live_search($btn,$text) { $txt=$_GET['findR']; $text=$_GET['text']; $cn=mysql_connect("localhost","root",""); mysql_select_db("per_info",$cn); if($text==null) { $query="SELECT u.p_id 'ID', u.p_name 'NAME', u.p_add 'ADDRESS', l1.loc_name 'CITY', l2.loc_name 'STATE', u.p_gen 'GENDER', u.p_photo 'PIC', u.p_phone 'PH' FROM p_info u, tbl_state l1, tbl_state l2 WHERE u.p_city = l1.loc_id AND l2.loc_id = l1.loc_parent AND u.p_name LIKE '".$txt."%' ORDER BY u.p_id desc LIMIT ".$btn.", 3"; } else { $query="SELECT u.p_id 'ID', u.p_name 'NAME', u.p_add 'ADDRESS', l1.loc_name 'CITY', l2.loc_name 'STATE',u.p_gen 'GENDER', u.p_photo 'PIC', u.p_phone 'PH' FROM p_info u, tbl_state l1, tbl_state l2 WHERE u.p_city = l1.loc_id AND l2.loc_id = l1.loc_parent AND u.p_name LIKE '".$text."%' ORDER BY u.p_id desc LIMIT ".$btn.", 3"; } if($rs=mysql_query($query)) { echo ""; while($row=mysql_fetch_array($rs)) { echo ""; echo ""; } } else { echo "error"; } } ?>

    I hope that it will helps you

    提交回复
    热议问题
    Name Address City State Gender Photo Phone No
    ".$row['NAME']." ".$row['ADDRESS']." ".$row['CITY']." ".$row['STATE']." ";if($row['GENDER']=="1") { echo "Male"; } else { echo "Female"; } echo " \"Pulpit ".$row['PH']."