php - Show tooltip for dynamic content -


i have following html code shows dynamic number of rows information, , there image link click specific information clicked row based on compentence_idfield..

            echo "<td>".$compi['competence_id']."</td>";             echo "<td><p style='text-align: center;'>".$compi['competence_group']."</p></td>";             if(isset($compi['competence_class'])){echo "<td>".$compi['competence_class']."</td>";}else echo "<td><p style='text-align: center;'>-</p></td>";             echo "<td>".$compi['competence_description']."</td>";             echo "<td class='evaluation'>";                 echo "<select class='ownlevelselect' id='ownlevelselect-.".$compi['competence_id']."' name='level-".$compi['competence_id']."' >";                    if (isset($compi['ownlevel']) && $compi['ownlevel']!= '' && !empty($compi['ownlevel']) && $compi['ownlevel']!= 0) {                       echo "<option selected value='".$compi['ownlevel']."' selected='selected'>".$compi['ownlevel']."</option>";                      }                     echo "<option value='' >--</option>";                     echo "<option value='1'>1</option><option value='2'>2</option><option value='3'>3</option><option value='4'>4</option><option value='5'>5</option>";                 echo "</select>";                 echo $compi['ownlevel'];  // below links click view content                 echo '<a target="_blank" href="'.index.'?categ='.$_get['categ'].'&action='.$_get['action'].'&subaction=viewlevels'.'&levels='.$compi['competence_id'].'">';                 echo '<img class="linkki" src="'.kuvat.'paivita.gif" alt="'._("tiedot").'" title="'._("what this?").'"/></a>';             echo "</td>";             echo "<td>"; 

this works, , can see corresponding info based on id posted. wondering if there anyway show information in tooltip without having click link , post id. here script retrieve data db show when image clicked.

    function fetchlevels($competence_id){     $this->query="select * levels comp_id=".$_request['levels'];     $tulos=$this->suoritakysely();     return $tulos; } 

simple answer is: can ajax.

we can provide exact code here maybe understand concept believe next video tutorial great place start.

youtube video tutorial: loading dynamic content on mouseover

in description of video can find download link video tutorials , files associated them. need example number 2.

for example work need change config file: connect.php , database

--

-- database: ajax


--

-- table structure table data

create table if not exists data ( id int(11) not null auto_increment, title varchar(45) not null, fname varchar(45) not null, lname varchar(45) not null, primary key (id) ) engine=myisam default charset=latin1 auto_increment=11 ;

--

-- dumping data table data

insert data (id, title, fname, lname) values (1, 'web developer', 'chris', 'johnson'), (2, 'web designer', 'joe', 'black'), (3, 'teacher', 'jason', 'mcintosh'), (4, 'family man', 'jake', 'kawaguchi'), (5, 'sans man card', 'brett', 'williams'), (6, 'i don''t know...', 'topher', 'howden'), (7, 'gamer', 'jason', 'luzader'), (8, 'wingman', 'chuck', 'strong'), (9, 'basketball player', 'chuck', 'barkley'), (10, 'singer', 'marta', 'zore');


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -