Hey everyone, am having problem with some php code in a plugin I'm using on my Wordpress site. The problem is that there is an option box that lets you select from among a list of files in a certain directory on my site, and you can't see the options. Well, you can only see the first couple letters of each file name, because the option box is acting like it has no info in it, all closed up. I should mention, that the box works fine in Firefox, the problem occurs in IE6 and IE7 (of course).
Here is the code for the select portion:
<select name="rh_image" onchange="previewImage(this.options[this.selectedIndex].value);" style="width:30%">
<option value="">Choose an image</option>
<?php
$image_dir = @dir(get_template_directory().'/images');
if ($image_dir) {
$img_dir_uri = get_template_directory_uri().'/images';
while(($file = $image_dir->read()) !== false) {
if ( preg_match('/\w*(\.jpg|\.gif|\.png)$/', $file) )
printf('<option value="%1$s/%2$s">%2$s</option>',$img_dir_uri,$file);
}
}
?>
</select>
First of all, there is some JavaScript, which I'm not too knowledgeable on yet, but maybe someone could explain the php code that he is using to display the file names in the option box? I can kind of follow it, but I'm still getting lost.
But anyway, I just need to know how to get the box to display properly in IE.
Thanks.
Edit: Oh, by the way, just in case you're wondering, yes, I have posted this question on the wordpress site, and even on the plugin's site, but am getting no responses. This forum is much more helpful for issues like this.