Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to show image in drop down menu
    text
    copied!<p>Is there anyway to show image in the drop down menu in Php ? I tried to embedding my code wit this tutorial code: <a href="http://www.marghoobsuleman.com/jquery-image-dropdown" rel="nofollow">http://www.marghoobsuleman.com/jquery-image-dropdown</a></p> <pre><code>&lt;?php if ($data-&gt;URL-&gt;Visible) { // URL ?&gt; &lt;td&lt;?php echo $data-&gt;URL-&gt;CellAttributes() ?&gt;&gt; &lt;div&lt;?php echo $data-&gt;URL-&gt;ViewAttributes() ?&gt;&gt;&lt;?php echo $data-&gt;URL-&gt;ListViewValue() ?&gt;&lt;/div&gt; &lt;?php //echo '&lt;pre&gt;';var_dump($data-&gt;URL);echo '&lt;/pre&gt;'; echo "&lt;select name='webmenu' id='webmenu' &gt;&lt;option value='".$data-&gt;URL-&gt;EditValue."'&gt;".$data-&gt;URL-&gt;EditValue."&lt;/option&gt;"; echo "&lt;option value='1' data-image='img/tim.png'&gt;True&lt;/option&gt;"; echo "&lt;option value='0' data-image='img/do.png'&gt;False&lt;/option&gt;"; echo "&lt;/select&gt;"; ?&gt; &lt;/span&gt;&lt;/td&gt; &lt;?php } ?&gt; </code></pre> <p>But it really turn my page into a mess, coz I don't really have 'body' tag in my php page, and the header I import from my header file. So I think I can't put that code inside mine properly, and it may not work for php page also... And I think there should be more straightforward method that people already use with php page for displaying image in drop down menu. I also try some other methods but it only work in Firefox, which is not good enough, coz I need to open this from any mobile device. Pls give me some hints ! Thank you!</p>
 

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