Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery popup from mysql data
    primarykey
    data
    text
    <pre><code> &lt;script type="text/javascript" src="jquerynew.js"&gt;&lt;/script&gt; &lt;script&gt; $(document).ready(function() { $('.wings').click(function(event) { $(this).next('.popupbox').fadeIn(); $('body').css('background','#333'); }); $('.popupclose').click(function(event) { unloadPopupBox(); $('body').css('background','white'); }); function loadPopupBox() { $('.popupbox').fadeIn("slow"); } function unloadPopupBox() { $('.popupbox').fadeOut("normal"); } $(".popupbox").hide(); }); &lt;/script&gt; &lt;style&gt; table { border-collapse:collapse; margin-left:370px; margin-top:20px; padding:10px; font-family:Trebuchet MS; min-width:530px; } table th,td { border:1px solid #8AC007; } .popupbox { position:fixed; _position:absolute; /* hack for internet explorer 6 */ background:#FFFFFF; left:0px; top:150px; border:2px solid lightgray; padding:15px; z-index:100px; font-size:15px; -moz-box-shadow: 0 0 5px lightgray; -webkit-box-shadow: 0 0 5px lightgray; box-shadow: 0 0 5px lightgray; display:none; } .popupclose { border:0px solid lightgray; color:#6FA5E2; font-family:verdana; font-weight:bold; line-height:15px; float:right; cursor:pointer; text-decoration:none; } &lt;/style&gt; &lt;?php $con = mysql_connect("localhost","root",""); mysql_select_db("popupsql",$con); $users = mysql_query("SELECT u.id, u.username, u.firstname, u.lastname FROM lms_user u"); $rows = array(); while($row = mysql_fetch_assoc($users)) $rows[] = $row; echo '&lt;table&gt; &lt;tr style="background:#8AC007;color:#8A4C25;font-size:15px;"&gt; &lt;th style="padding:10px;"&gt;Firstname&lt;/th&gt; &lt;th style="padding:10px;"&gt;Lastname&lt;/th&gt; &lt;th style="padding:10px;"&gt;Status&lt;/th&gt; &lt;/tr&gt;'; foreach($rows as $row) { $userid = $row['id']; echo '&lt;tr&gt; &lt;td style="padding:5px;"&gt;'.$row['firstname'].'&lt;/td&gt; &lt;td style="padding:5px;"&gt;'.$row['lastname'].'&lt;/td&gt; &lt;td style="padding:5px;text-align:center;"&gt; &lt;a class="wings"&gt;view status&amp;nbsp;'.$userid.'&lt;/a&gt; &lt;div class="popupbox"&gt; &lt;div style="height:30px;"&gt;&lt;img class="popupclose" src="close.png" style="float:right;"&gt;&lt;/img&gt;&lt;/div&gt;'; $grades = mysql_query('SELECT u.firstname, u.lastname, u.email, ggh.finalgrade, gi.itemname FROM lms_grade_grades_history ggh, lms_grade_items gi, lms_user u WHERE ggh.itemid = gi.id AND gi.itemtype = "course" AND u.id = ggh.userid AND u.id = '.$userid.''); $rows = array(); while($row = mysql_fetch_assoc($grades)); $rows[] = $row; foreach($rows as $row) { echo 'SELECT u.firstname, u.lastname, u.email, ggh.finalgrade, gi.itemname FROM lms_grade_grades_history ggh, lms_grade_items gi, lms_user u WHERE ggh.itemid = gi.id AND gi.itemtype = "course" AND u.id = ggh.userid AND u.id = '.$userid.''; } echo '&lt;/div&gt; &lt;/td&gt; &lt;/tr&gt;'; } echo '&lt;/table&gt;'; ?&gt; </code></pre> <p>Here is my code for displaying jQuery popup dynamically from mysql database., a popup is displaying for all the rows but not displaying with a same id i.e., a correct id wasn't passing to a popup window. Can anyone suggest me. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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