<script type="text/javascript">
var urlmenu = document.getElementById( "rpdropdown3" );
urlmenu.remove(1);
urlmenu.onchange = function() {
window.open( this.options[ this.selectedIndex ].value, "_blank" );
var options = rpdropdown3.options;
// Look for a default selected option
for (var i=0, iLen=options.length; i<iLen; i++) {
if (options[i].defaultSelected) {
rpdropdown3.selectedIndex = i;
return;
}
}
// If no option is the default, select first or none as appropriate
selectElement.selectedIndex = 0; // or -1 for no option selected
};
</script>';
$postslist = get_posts( $args );
foreach( $postslist as $posts ){
$string .= '<option value="' . get_the_permalink($posts) . '">-- ' .get_the_title($posts).'</option> ';
}
Doesn't work on any mobile browser (works on computers browsers) , the select dropdown doesn't open the link as expected