Clit
Posting Freak
- Feb 25, 2012
- 1,065
- 103
Obviously this is the dropdown menu for news image for posting a news article from my housekeeping...
Without the code the page loads instantly, with the code it just loads and loads and keeps going until I hit stop. Basically the page won't load at all. I usuaully good with figuring this shit out, but, I just cannot get my finger wrapped around this one.
Code:
<div class='clearfix'>
<label for='article_image'>Image</label>
<div class='input'>
<!--<input type='text' name='article_image' id='article_image' style='width: 400px'> <i>top news</i>
-->";
//Looks into the directory and returns the files, no subdirectories
echo "<select name='article_image' onchange='imgchange(this.value)'>";
//The path to the style directory
$dirpath = "http://puffet.org/r63/c_images/Top_Story_Images";
$dh = opendir($dirpath);
while (false !== ($file = readdir($dh))) {
//Don't list subdirectories
if (!is_dir("$dirpath/$file")) {
//Truncate the file extension and capitalize the first letter
echo "<option value='$file'>$file</option>";
}
}
closedir($dh);
//Close Select
echo "</select><br /><br />
<img src='asd' id='newsimage'/>
</div>
</div>
Without the code the page loads instantly, with the code it just loads and loads and keeps going until I hit stop. Basically the page won't load at all. I usuaully good with figuring this shit out, but, I just cannot get my finger wrapped around this one.