Note that there are some explanatory texts on larger screens.

plurals
  1. POShow tooltip for dynamic content
    text
    copied!<p>I have the following HTML code that shows a dynamic number of rows with information, and then there is an image link that I click to get some <strong>specific information about the clicked row</strong> based on the <code>compentence_ID</code>field..</p> <pre><code> echo "&lt;td&gt;".$compi['Competence_ID']."&lt;/td&gt;"; echo "&lt;td&gt;&lt;p style='text-align: center;'&gt;".$compi['Competence_Group']."&lt;/p&gt;&lt;/td&gt;"; if(isset($compi['Competence_class'])){echo "&lt;td&gt;".$compi['Competence_class']."&lt;/td&gt;";}else echo "&lt;td&gt;&lt;p style='text-align: center;'&gt;-&lt;/p&gt;&lt;/td&gt;"; echo "&lt;td&gt;".$compi['Competence_Description']."&lt;/td&gt;"; echo "&lt;td class='evaluation'&gt;"; echo "&lt;select class='ownlevelselect' id='ownlevelselect-.".$compi['Competence_ID']."' name='level-".$compi['Competence_ID']."' &gt;"; if (isset($compi['ownlevel']) &amp;&amp; $compi['ownlevel']!= '' &amp;&amp; !empty($compi['ownlevel']) &amp;&amp; $compi['ownlevel']!= 0) { echo "&lt;option selected value='".$compi['ownlevel']."' selected='selected'&gt;".$compi['ownlevel']."&lt;/option&gt;"; } echo "&lt;option value='' &gt;--&lt;/option&gt;"; echo "&lt;option value='1'&gt;1&lt;/option&gt;&lt;option value='2'&gt;2&lt;/option&gt;&lt;option value='3'&gt;3&lt;/option&gt;&lt;option value='4'&gt;4&lt;/option&gt;&lt;option value='5'&gt;5&lt;/option&gt;"; echo "&lt;/select&gt;"; echo $compi['ownlevel']; // Below are the links I click to view the content echo '&lt;a target="_blank" href="'.INDEX.'?categ='.$_GET['categ'].'&amp;action='.$_GET['action'].'&amp;subaction=viewlevels'.'&amp;levels='.$compi['Competence_ID'].'"&gt;'; echo '&lt;img class="linkki" src="'.KUVAT.'paivita.gif" alt="'._("tiedot").'" title="'._("What is this?").'"/&gt;&lt;/a&gt;'; echo "&lt;/td&gt;"; echo "&lt;td&gt;"; </code></pre> <p>This works, and I can see the corresponding info based on the ID posted. But I am wondering if there is anyway to show that information in a tooltip without having to click the link and POST the ID. Here is the script to retrieve the Data from DB that I show when the image is clicked.</p> <pre><code> function fetchlevels($Competence_id){ $this-&gt;query="SELECT * FROM levels WHERE comp_id=".$_REQUEST['levels']; $tulos=$this-&gt;suoritaKysely(); return $tulos; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload