473,396 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to use tooltip in php using ajax

Hello All,
I am trying to apply tooltip class in my code in insertdata.php, but its not working can anyone help me
In this code tooltip class ie 'cont tooltip ui-corner-all' properly worked
my code is
Expand|Select|Wrap|Line Numbers
  1. <form name="myform" class="pager-form" method="post" action="">
  2.            <div class="hastable" id="div_month_wise_follow_up">
  3.  
  4.                     <table class="sortable"> 
  5.                         <thead> 
  6.                         <tr>
  7.                             <th width="40">Sr no</th>
  8.                             <th width="70">Name</th>
  9.                             <th width="90">Email Address</th>
  10.                             <th width="150">Follow Up Description</th>
  11.                             <th width="120">Assign To</th>
  12.                         </tr> 
  13.                         </thead>
  14.                     <tbody>
  15.                         <?php 
  16.                         $i=1;
  17.                         $sr_no = 1;
  18.                             if($_GET['page']==1 || $_GET['page']=='')
  19.                                     {
  20.                                         $sr_no=1;
  21.                                     }
  22.                                     else
  23.                                     $sr_no= (($_GET['page']-1)*$limit)+1;
  24.                         $sum=0;
  25.                         $prevUserID = 0;
  26.                         $a=0;
  27.  
  28.                         while($res2=mysql_fetch_array($sql1)){
  29.  
  30.  
  31.                         ?>
  32.                              <tr class="0"<?php $class_name?>>
  33.                                <td class="center"><?php echo $sr_no; ?></td>
  34.                                <td><?php echo $res2['name'];?></td>
  35.                                <td><?php echo $res2['email']; ?></td>
  36.                                <td><div class="cont tooltip ui-corner-all" title="<?php echo $res2['description']; ?> "><?php echo substr($res2['description'],0,30); ?> </div></td>
  37.                                <td style="text-align:center"><?php echo $res2['fname'];?></td>
  38.                              </tr>
  39.  
  40.                         <?php 
  41.  
  42.                                 $sr_no++;
  43.                         }    ?>
  44.              </tbody>
  45.  
  46.                 </table>
  47.         </div>
  48.         </form>
  49.  
but in insertdata.php ,its not applying
my insertdata.php code is
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. if($_POST['formname'] == 'month_wise_follow_up_report')
  3. {
  4.  
  5.     $trimmed = trim($var);
  6.     $type = $_POST['type'];
  7.     $mnt = $_POST['sel_month'];
  8.     $yer = $_POST['sel_year'];
  9.     $sels_r= $_POST['sales_representative'];
  10.     if($_POST['sel_month']!= " " and $_POST['sel_year'] != "" and $_POST['sales_representative']!="")
  11.         {        //echo "select cm.name,cm.email,fp.description,u.fname from client_master as cm,follow_up as fp,user as u where fp.client_id=cm.user_id and cm.assignto=u.admin_user_id and month(cm.created_date) = ".date('m')." and year(cm.created_date) = ".date('Y')."";            
  12.             $sql2 = "select cm.name,cm.email,fp.description,u.fname from client_master as cm,follow_up as fp,user as u where fp.client_id=cm.user_id and cm.assignto=u.admin_user_id and month(fp.follow_up_date) = ".$mnt." and year(fp.follow_up_date) = ".$yer." and cm.assignto= $sels_r";
  13.         }
  14.  
  15.     else
  16.     {
  17.            $sql2 = "select cm.name,cm.email,fp.description,u.fname from client_master as cm,follow_up as fp,user as u where fp.client_id=cm.user_id and cm.assignto=u.admin_user_id and month(fp.follow_up_date) = ".$mnt." and year(fp.follow_up_date) = ".$yer."";
  18.     }
  19.  
  20.     $qry2 = mysql_query($sql2);     
  21.  
  22.  
  23.     $new_month_wise_report = "";
  24.     $new_month_wise_report .="
  25.       <div class='hastable' id='div_month_wise_follow_up'>
  26.     <table class='sortable'>
  27.                         <thead> 
  28.                         <tr>
  29.                             <th width='40'>Sr no</th>
  30.                             <th width='70'>Name</th>
  31.                             <th width='90'>Email Address</th>
  32.                             <th width='150'>Follow Up Description</th>
  33.                             <th width='120'>Assign To</th>
  34.                         </tr> 
  35.                         </thead>
  36.                     <tbody>";
  37.  
  38.  
  39.                         $sr_no = 1;
  40.  
  41.  
  42.                         while($res2=mysql_fetch_array($qry2))
  43.                         {
  44.                         //'<div class='cont tooltip ui-corner-all' title='".$res2['description'];."'>'    
  45.  
  46.             $new_month_wise_report .="<tr class='0'".$class_name.">
  47.                                 <td class='center'>".$sr_no."</td>
  48.                                 <td>
  49.                                     ".$res2['name']."
  50.                                 </td>
  51.                                 <td>".$res2['email']."</td>
  52.                                 <td><div class='cont tooltip ui-corner-all' title='".$res2['description']."' > ".substr($res2['description'],0,30)."</div></td>
  53.                                 <td style='text-align:center'>".$res2['fname']."</td>
  54.                             </tr>";
  55.  
  56.                             $sr_no++;
  57.                         }    
  58.             $new_month_wise_report .="</tbody>
  59.  
  60.                             </table></div>";
  61.  
  62.     echo "month_wise_follow_up_report|".$new_month_wise_report;
  63. }
  64. ?>
  65.  
my validate\.js code is
Expand|Select|Wrap|Line Numbers
  1. function search_month_wise_follow_up_report(val)
  2. {    //alert(val);
  3.     var month = document.getElementById('sel_month').value;
  4.     var year = document.getElementById('sel_year').value;
  5.     var sales_r = document.getElementById('sales_representative').value;
  6.     var type = val;
  7.  
  8.     var parameters ='formname=month_wise_follow_up_report&sel_month='+month+'&sel_year='+year+'&type='+type+'&sales_representative='+sales_r+'&';
  9.     makeRequest('insert_data.php', parameters);    
  10.     return false;
  11. }
  12.  
getcontent.js file is
Expand|Select|Wrap|Line Numbers
  1. if(act.indexOf('month_wise_follow_up_report')>0)
  2.             {
  3.                 document.getElementById('div_month_wise_follow_up').innerHTML = "";
  4.                 document.getElementById('div_month_wise_follow_up').innerHTML=res[1];
  5.                 document.getElementById('div_pagination').innerHTML = "";
  6.             }
  7.  
Apr 16 '11 #1
2 2515
johny10151981
1,059 1GB
do you know Title create a very good tooltips? and using javascirpt you can dynamically change tooltips
Apr 17 '11 #2
But i dont want to use title,i need to apply my class,but its not working
Apr 18 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Senthil | last post by:
Hi all I'm new in ajax. How to upload a image using ajax..
5
by: Martin | last post by:
Hello NG, I've been doing some AJAX for a few weeks now. The basics worked fine so far, but now I've got the following problem which I can't solve: With AJAX you typically update/replace only...
3
by: noballack | last post by:
I've got a problem, I'm working with Ajax in a web with a form with a list of checkbox added to the form via an Ajax.Updater method. These added checkboxs are not been sended by the form if I use...
5
by: lucyh3h | last post by:
Hi, I am trying to use XMLHttpRequest to do server side validation. I have several fields on a form and a submit button. The submit button has an event assocated with it when clicked. The...
3
by: bss | last post by:
Dear All, I have developing a French website using PHP & Ajax. In that I tried to display some French texts from mysql database using Ajax. Form local I got the text from db with Correct...
13
by: Marvin Zhang | last post by:
Hi, I'm not familiar with web programming, but I have a problem here. I have a page. When a user click one button on it, I will use AJAX to request a PHP script which will do a bunch of tasks,...
8
by: Bhuwan Bhaskar | last post by:
Hi, Can we access database (SQL) using AJAX ? Thanks, Bhuwan
9
by: Tim Johnson | last post by:
I'm an experienced web/CGI programmer, but new to ajax. I'd like to review some examples of how to post data from a form to server using AJAX. I have already created some examples successfully...
1
by: krishemanth | last post by:
sir, I want to update a value in dropdown using ajax i had a listing of some categories in dropdown along with that i had an add category in that dropdown box when select that addcategory option...
1
by: Vikas Paliwal | last post by:
I am using tooltip in php using ajax,but problem is that tooltip is not displaying in well manner ,i am trying to apply class "cont tooltip ui-corner-all" ,but its not working my code is ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.