drop down menu default options all selected - html

I was wondering how to have all the options in a drop menu (using select tags) highlighted?
I already created a button to created a select all button to do this but I want the drop menu all selected by default when arriving on the page.
It would be great if it works for IE and firefox.
thanks

If your select is multiple then any <option> that has selected="selected" will be highlighted by default.
http://www.w3schools.com/tags/tag_option.asp

Related

Primefaces SlideMenu- change initial state

We are using SlideMenu from primefaces (v3.5). Let's say there is a main menu and 2 sub menus. Is it possible to change the default view of the SlideMenu so that I see the 1st submenu always. Could someone help me on this?

hide entire blue/black dropdown (options) of empty select

I have an empty select list on which i have binded custom drop down.
On clicking on empty select, it comes into focus and shows the empty option list(which is blue in color with black border)
Is there a way in css so that we can hide that entire empty option section.
<select id="displaydropdown"></select> <!--empty select list-->
<script>
//on displaydropdown click show/hide custom dropdown
</script>
In this case custom drop down is visible, along with that empty select list is also visible. i want to hide that internal list box of select list. Currently i am looking into user agent stylesheets to see whether we can override its default functionality.
Please let me know if anymore details.
Try this described in this demo:
HTML:
<select id="displaydropdown"></select>
CSS:
#displaydropdown:empty {
display: none;
}

Position the dropbox menu

Is there any way to position the opened dropdown menu? I mean as I click on the <select>, the options appear in the box which is located over the selected option. Is there any solution to move this options box down?
This is what happens:
What I want to happen:
Sample here : jsFiddle
<select>
<option>BMW</option>
<option>Mercedes</option>
<option>Ferrari</option>
<option>Audi</option>
<option>Fiat</option>
</select>
There's no way to position the option dropdown box from a select when using native controls, it's part of the built in control. You'd have to create custom select boxes to control the positioning of the dropdown.

How to tell codeception to finish selection from a dropdown list items without clicking any submit button

i can select element from a drop down list in codeception but somehow it is not showing as selected in box as i think the select operation is somehow not finished.I donot have any submit button so i tried to move my focus to any other element on the page but still the select box stay empty.Below is my code to select item from a dropdown list.
$I->selectOption('//*[#class="ng-scope" and #ng-controller="dataIsland"]/*[local-name()="select"]','partlycloudy');
please help.
thanks but i got my answer,below code can help you to select element from drop down list.
$I->pressKey('//*[#xpath to the form]/*[local-name()="select"]','element to select',WebDriverKeys::ENTER);
thanks !

DropDown menu with ClickEvent

When I click a button, then a drop down menu must be shown. When I click anywhere in the page it, needs to hide. The problem I have is here: when I run the page, I can see the drop down menu instead of the click event. I tried with different div tags, but to no effect.
Demo: http://jsfiddle.net/Navya/69KGD/
You need to set your dropdown list visibility to false (to hide it) when page loads.
$("#container").hide();
After that, when you click the button you set visibility to true (show it).
$("#container").show();