Note that there are some explanatory texts on larger screens.

plurals
  1. POJquery dialog-box is not functioning after I have implemented the lightbox
    primarykey
    data
    text
    <p>Here is my code, now lightbox is working. Dialogbox only works when we remove the lightbox scripts. Can anyone suggest what may be the reason for the dialog box is not loading?. on the chrome console it shows Uncaught TypeError: Cannot call method 'click' of null </p> <pre><code>&lt;?php include 'header.inc.php'; $floor_id=$_GET['id']; $path='floorPlanImages'; //include 'addImageForPlan.php'; $select_floor_images=mysql_query("SELECT id,image FROM zb_floorplan_gallery WHERE floor_id='$floor_id'"); if(mysql_num_rows($select_floor_images)&gt;0) { ?&gt; &lt;html lang="en"&gt; &lt;!doctype html&gt; &lt;head&gt; &lt;meta charset="utf-8" /&gt; &lt;title&gt;jQuery UI Dialog - Default functionality&lt;/title&gt; &lt;link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /&gt; &lt;script src="http://code.jquery.com/jquery-1.9.1.js"&gt;&lt;/script&gt; &lt;script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" href="css/style.css" /&gt; &lt;link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" /&gt; &lt;/head&gt; &lt;table&gt; &lt;tr&gt;&lt;th colspan="5"&gt;Image gallery&lt;/th&gt;&lt;/tr&gt; &lt;tr&gt; &lt;?php $count=0; while ($display_image=mysql_fetch_assoc($select_floor_images)) { ?&gt; &lt;td class="&lt;?php echo $display_image['id'];?&gt;" height="100" width="100"&gt; &lt;!-- &lt;img src="&lt;?php echo $path.'/'.$display_image['image'];?&gt;" width="100%" rel="lightbox[roadtrip]" class="&lt;?php echo $display_image['id'];?&gt;"&gt;&lt;/a&gt; --&gt;&amp;nbsp;&amp;nbsp; &lt;a href="&lt;?php echo $path.'/'.$display_image['image'];?&gt;" rel="lightbox[gallery]" title="Floor Plan images"&gt; &lt;img src="&lt;?php echo $path.'/'.$display_image['image'];?&gt;" width="100%" &gt; &lt;/a&gt; &lt;a href="#" class="table-icon delete" title="Delete" id="&lt;?php echo $display_image['id'];?&gt;"&gt;&lt;/a&gt;&lt;/td&gt; &lt;?php $count++; if($count==4) { ?&gt;&lt;/tr&gt;&lt;?php $count=0; } ?&gt; &lt;script type="text/javascript"&gt; $( document ).ready(function() { $('#&lt;?php echo $display_image['id'];?&gt;').click(function(){ $( '#&lt;?php echo $display_image['id'];?&gt;').html("Are you sure you want to delete this image?").dialog( { buttons: { 'Confirm': function() { //do something $.ajax({ type: "POST", url: "deleteFloorImage.php?id=&lt;?php echo $display_image['id'];?&gt;", data: { id: "&lt;?php echo $display_image['id'];?&gt;" } }).done(function( msg ) { $("td.&lt;?php echo $display_image['id'];?&gt;").hide(); }); $(this).dialog('close'); }, 'Cancel': function() { $(this).dialog('close'); } } } ); }); }); &lt;/script&gt; &lt;?php } ?&gt; &lt;/table&gt; &lt;?php } else { echo 'No images found for this floor plan'; } include 'footer.inc.php'; ?&gt; &lt;script type="text/javascript" src="js/prototype.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="js/lightbox.js"&gt;&lt;/script&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    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.
    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