Hmm… I went ahead and tried to merge those two codes and got to the following :
[Code moderated as per the Forum Rules. Please use the pastebin]
This gave me two drop downs with the same tags. the 1st one has all the tags of the category and the second one has few of them. Once I get rid of the second one, I will get what I want. Anyone please halp???
And i also found the following code to display all the tags in a drop down BUT with a submit button. Will be better if could be resolved without the submit button.
<?php
if ($tags = get_tags( array('orderby' => 'name') ))
{
echo '<form action="'.get_bloginfo('url').'" method="get">';
echo '<select name="tag" id="tag" class="postform">';
foreach ($tags as $tag)
{
echo '<option value="'.$tag->slug.'">'.$tag->name.'</option>';
}
echo '</select> ';
echo '<input type="submit" name="submit" value="view" />';
echo '</form>';
}
?>