Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Try to avoid inlining your jQuery calls like that. Put a script tag at the top of the page to bind to the <code>click</code> event:</p> <pre><code>&lt;script type="text/javascript"&gt; $(function(){ $('#thickboxButton').click(function(){ $('#thickboxId').click(); }); }); &lt;/script&gt; &lt;input id="thickboxButton" type="button" value="Click me"&gt; &lt;a id="thickboxId" href="myScript.php" class="thickbox" title=""&gt;Link&lt;/a&gt; </code></pre> <p><strong>Edit:</strong></p> <p>If you're trying to simulate a user physically clicking the link, then I don't believe that is possible. A workaround would be to update the button's <code>click</code> event to change the <code>window.location</code> in Javascript:</p> <pre><code>&lt;script type="text/javascript"&gt; $(function(){ $('#thickboxButton').click(function(){ window.location = $('#thickboxId').attr('href'); }); }); &lt;/script&gt; </code></pre> <p><strong>Edit 2:</strong></p> <p>Now that I realize that Thickbox is a custom jQuery UI widget, I found the instructions <a href="http://jquery.com/demo/thickbox/" rel="noreferrer">here</a>:</p> <h3>Instructions:</h3> <ul> <li>Create a link element (<code>&lt;a href&gt;</code>)</li> <li>Give the link a class attribute with a value of thickbox (<code>class="thickbox"</code>)</li> <li>In the <code>href</code> attribute of the link add the following anchor: <code>#TB_inline</code></li> <li><p>In the <code>href</code> attribute after the <code>#TB_inline</code> add the following query string on to the anchor:</p> <p>?height=300&amp;width=300&amp;inlineId=myOnPageContent</p></li> <li><p>Change the values of height, width, and inlineId in the query accordingly (inlineID is the ID value of the element that contains the content you would like to show in a ThickBox.</p></li> <li>Optionally you may add modal=true to the query string (e.g. <code>#TB_inline?height=155&amp;width=300&amp;inlineId=hiddenModalContent&amp;modal=true</code>) so that closing a ThickBox will require calling the <code>tb_remove()</code> function from within the ThickBox. See the hidden modal content example, where you must click yes or no to close the ThickBox.</li> </ul>
    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.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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