select shows one line only in wordpress admin panel
-
Hi,
I am experimenting with a plugin and want a listbox to display all options in a box, instead, I get a single option with an up and down arrow? I have the have the following code:-
add_settings_section( ‘section_general’, ‘General Plugin Settings’, array( $this, ‘section_feed_episodes’ ), $this->general_settings_key );
function section_feed_episodes()
{
echo ‘<h2 class=”listBox>Feeds</h2>’;
echo ‘
<select id=”feedSelect” size=”10″ onchange=”feedEpisodes()”>
<option value=”text1″>Text1
<option value=”text2″>Text2
<option value=”text3″>Text3
<option value=”text4″>Text4
<option value=”text5″>Text5
</select><p id=”demo”></p>
<script>
function feedEpisodes()
{
var x = document.getElementById(“feedSelect”).value;
document.getElementById(“demo”).innerHTML = “You selected: ” + x;
}
</script>’;
}Regards,
Dion
The topic ‘select shows one line only in wordpress admin panel’ is closed to new replies.