Note that there are some explanatory texts on larger screens.

plurals
  1. PORepeat region on jQuery BlockUI script fails to work
    primarykey
    data
    text
    <p>I am trying to use repeat region on the jQuery BlockUI script but it fails to work.</p> <p>This is the code I am using now:</p> <pre><code> &lt;?php do { ?&gt; &lt;script type="text/javascript"&gt; $(document).ready(function() { $('#t&lt;?php echo $row_dd31['dNo']; ?&gt;').click(function() { $.blockUI({ message: $('#q&lt;?php echo $row_dd31['dNo']; ?&gt;'), css: { width: '1024px' } }); }); $('#yes').click(function() { // update the block message $.blockUI({ message: "&lt;h1&gt;Remote call in progress...&lt;/h1&gt;" }); $.ajax({ url: 'wait.php', cache: false, complete: function() { // unblock when remote call returns $.unblockUI(); } }); }); $('#no').click(function() { $.unblockUI(); return false; }); }); &lt;/script&gt; &lt;?php } while ($row_dd31 = mysql_fetch_assoc($dd31)); ?&gt; </code></pre> <p>Why does it not work?</p> <p>Can one not use PHP repeat region alongside JavaScript? If not are there any alternatives to be used?</p> <hr> <p>This is the code for the modal dialog:</p> <pre><code>&lt;!-- modal --&gt; &lt;?php do { ?&gt; &lt;div id="q&lt;?php echo $row_dd31['dNo']; ?&gt;" style="display:none; cursor: default"&gt; &lt;h3&gt;Driver &lt;?php echo $row_dd31['dNo']; ?&gt;&lt;/h3&gt;&lt;p&gt; &lt;input type="button" id="yes" value="Save" style="width: 75px; height: 50px;"/&gt; &lt;input type="button" id="no" value="Exit" style="width: 75px; height: 50px;"/&gt; &lt;/div&gt; &lt;?php } while ($row_dd31 = mysql_fetch_assoc($dd31)); ?&gt; </code></pre> <p>This is how the tiles are generated:</p> <pre><code>&lt;tr height="100px" align="center"&gt; &lt;?php do { ?&gt; &lt;td style="background-color: &lt;?php echo $row_dd1['colour']; ?&gt;;"&gt; &lt;input type="hidden" id="&lt;?php echo $row_dd1['dNo']; ?&gt;"&gt; &lt;button type="submit" class="link" id="t&lt;?php echo $row_dd1['dNo']; ?&gt;"&gt;&lt;span&gt;&lt;?php echo $row_dd1['dNo']; ?&gt;&lt;/span&gt;&lt;/button&gt; &lt;/td&gt; &lt;?php } while ($row_dd1 = mysql_fetch_assoc($dd1)); ?&gt; &lt;/tr&gt; </code></pre>
    singulars
    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.
 

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