HTML select size attribute on iPad
The HTML select size attribute specifies the number of visible options in a drop-down list. The example below will show all four entries on the drop-down, however nothing was shown in iPad.
<html>
<body>
<select size="4">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
</body>
</html>
Is there a way that I can show all four entires in iPad?
JimHdk wrote:
BobTheFisherman wrote:
JimHdk wrote:
BobTheFisherman wrote:
The size attribute is supported in all major browsers, except Google Chrome and Safari.
Source: http://www.w3schools.com/tags/attselectsize.asp
The size attribute is supported as usual in Mac OS Safari. In mobile Safari the size attribute does not produce a multiple element list but, rather, a pop-list with multiple elements. The appearance is different but the functionality is the same.
Using your Safari browser --- Compare this result using Safari OSx http://www.w3schools.com/tags/tryit.asp?filename=tryhtmlselectsize results in 4 items in dropdown.
and using your Firefox browser this result using FireFox http://www.w3schools.com/tags/tryit.asp?filename=tryhtmlselectsize results in 2 items in dropdown.
You will notice that Safari does not support the size attribute of the select tag which in this case was "2".
Message was edited by: BobTheFisherman
The reason that Mac OS Safari displays 4 items in the example you cite is because the minimum number of items in a selection list that Safari will display is 4. If you try the following example where size is set to 5 and there are seven list items you will see that Safari does, indeed, support the size attribute (with the lower limit of 4).
Here 5 is specified as the size and only 5 items (of the seven given) will be displayed.
<html>
<body>
<select size="5">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
<option value="ford">Ford</option>
<option value="mercury">Mercury</option>
<option value="lincoln">Lincoln</option>
</select>
</body>
</html>
So it does not work. It only appears correctly if you want to display 4 or more in the dropdown box.
As an aside, is this a Safari standard way of implementing the select tag with the size attribute? If so, maybe Safari users should rethink their bashing of Microsoft IE for implementing non-standard functionality. I'm not suggesting that you participate in that activity and I thank you for testing and explaining this Safari quirk.
Similar Messages
-
Use of titleKey attribute in html:select tag
Hi,
There is one "titleKey" attribute to create mouse over pop-up texts taking key values from property files in case of i18n. It works for every struts specific tag like <html:text titleKey="help.rmc.name"/> or <html:checkbox titleKey="help.rmc.name"/> except for <html:select> tag which is used for creating combo box or list box. But this tag contains the titleKey attribute.
Please give me some suggestions how to implement this mouse over pop-up texts in case of <html:select> tagHi,
There is one "titleKey" attribute to create mouse over pop-up texts taking key values from property files in case of i18n. It works for every struts specific tag like <html:text titleKey="help.rmc.name"/> or <html:checkbox titleKey="help.rmc.name"/> except for <html:select> tag which is used for creating combo box or list box. But this tag contains the titleKey attribute.
Please give me some suggestions how to implement this mouse over pop-up texts in case of <html:select> tag -
How to display html:select in Edit page using same options as in Add page
Hi,
<html:select property="tblAssociateDetailsVisaType">
<html:option value="H1">H1</html:option>
</html:select>I want small help -
I have two functionalities 1.add 2.Update
In Add i have nearly 10 dropdown lists with average 20 options, when i submit into DB stored a single record.
Now when i want to Edit that same record , i am just getting the value from DB and displaying as <td><html:text property="tblAssociateDetailsVisaType" value="<%=VisaType_page%>" size="10"/> which is a wrong way!
But, i am struggling in showing the same dropdown list with all the option with the option retrieved from the DB on top with <html:select ..... selected>!
Please help me how to do ?
I would like to make you of .properties file in doing so ! Which avoids recompiling!
Thanks in advance!
Edited by: ganeshtyarala on Dec 17, 2007 11:57 AMYou could store all of the options in a collection and then loop through it and compare it to the value that was returned. (collection contains beans with value and label attribute)
This is the code I use.. it is using JSTL tags, but you could implement the same using other methods.
When my application loads I query the database to get the possible values for the drop down and then load them into the the form.
<div class="fieldSpan">
<select name="rewardTypeCode" id="rewardTypeCode">
<c:forEach var="rewardTypeCodes" items="${sessionScope.myActivity.rewardTypeCodeList}">
<option <c:if test="${sessionScope.myActivity.rewardTypeCode == rewardTypeCodes.value}">selected</c:if>
value="${rewardTypeCodes.value}">${rewardTypeCodes.value} - ${rewardTypeCodes.label}</option></c:forEach></select></div> -
Hi All,
In my below code I want to make <html:select> as readonly like I did for <html:text>
I don't want to make it disabled as it is graying out that field.
My requirement is that it should be visible and also it shouldn't be editable.
I am using Struts...!!!
<html:text property="paramName" size="20" maxlength="50" readonly="true"/>
<html:select property="paramTypeId" disabled="true"> // I dont want to use this--- disabled="true"
<html:options collection="queryReturnType" property="value" labelProperty="label"/>
</html:select>Thanks in advance....!!Can some one tell me in the below code
*1. what is test="${controlEnabled}"....wha is this controlEnabled variable*
*2. do I need to create an attribute for paramTypeId_Label in my form bean ??*
I just wanna to make my <html:select> readonly..pls see my first post in this thread....!!
<c:choose>
<c:when test="${controlEnabled}">
<html:select property="paramTypeId" >
<html:options collection="queryReturnType" property="value" labelProperty="label"/>
</html:select>
</c:when>
<c:otherwise
<html:text property="paramTypeId_Label" value="${queryReturnType[paramTypeId].label}" readonly="true"/>
<html:hidden property="paramTypeId"/>
</c:otherwise>
</c:choose>--Thanks -
Problem with html:select or html:options tags using struts,jsp and tomcat
Hi
I'm updating a Struts-Project to a new layout and therefore rework all jsp Sites.
I'm also using a new Folder-Structure and update therefore my struts-config file.
My Problem now is:
Till now, we had a select-field with a code like this:
< html:form action="/timetableAction" method="POST">
< table width="53%" border="0">
< tr>
< td>< html:radio property="dauer" value="semester"
/></ td>
< html:select property="semester" size="1">
< htmlptions name="semesterList" />
</ html:select>
</ html:form>
The problem now is, that whenever I use any <html:xy> tag, the tomcat server I use can not show the page, he shows just the headers of the template, but not the
content.-jsp-File where the form would be in. He stops right in the middle of the html page, when he notices the <html:xy> tags.
And the funny thing is, that he has no problem to show a page when there is a <html:errors> within it? Why could this be? the struts-html.tld File is well included and teh Tomcat Server shows no exceptions.
Waiting for you answers and thanksThank you, I already got the answer in another forum
-
Index: 0, Size: 0 on iPad
Hi Pro's,
I get the error: 'Index: 0, Size: 0' when connecting to the server on an iPad with an user's id (SAP Authentication)
I can open the list of dashboards and dashboard with an Administrator account on the iPad. I then double checked the user's rights in CMC and tested it through the BI portal and I can see the list of dashboards, open and refresh them from the portal with the user's id with no issues. So why the error on iPad? Am I missing something?
Environment: SAP BI App v 5.1.9 Build 12 (407721)
Thank you
GerrieHi,
Resolution:-
l apply point 3 in note 1783173 more specifically :
(CMC-->Personal Categories--> select user in question 'Mobile Test'-->User Security-->Add Principals-->select user in question 'Mobile Test'-->select Add and Assign Security-->select Full Control (Owner) right and Apply).
l More general solution is to give this to a group (could be everyone) at to-Level : CMC-> Personal Categories->Manage-> Top-Level Security-> Add Group -> Add and Assign Security.
Check the Note: 1836197 - MOB00082 index:0,Size:0 in Ipad when using a non administrator group member
--SumanT -
Read Only and HTML Table Cell Attributes
Hi Guys,
I believe i have come accross a bug - i'm been working on a form that can be filled out and printed - when going into print for sake of the output looking nice i set the form element to read-only.
As soon as an element such as a drop down box, text feild, text area, etc which display as "[selected value]" in plain text in read only mode, are changed to the read only mode apex seem to ignore the html table cell attributes.
For example i have a id number in the top left and then a version number in the top right. Both use a text feild; the top left uses 'width="100%"' for it's HTML Table Cell Attribute to push the right cell to the right. and the right cell has 'align="right"'. Now this works fine when read only is off... but as soon as read only is on, both the width and the alignment are totally ignored, and i can't find any sign of them in the code.
Because this is for printing; using the "disable" on the form element instead of "read only" function, isn't appropriate as disabled will make the elements faded and hard to read when printed, and keeping the elements as is will allow the user to edit information on the print screen - which is not appropriate.
Is this a bug? Will it be fixed soon? Is there any work around?
Cheers,
AlexUse the "Read Only Element Table Cell(s) Attributes" in the Read Only region of the Item edit form.
Scott -
Default UIPicker in UIWebView for html select drop down- too large font.
Hi everyone,
The default picker that is used for selecting options from html select tag (drop down) in a UIWebView is cutting off our data.
I could use labels if it were not in a web view, but can't work out how to adjust the picker used in web view.
The only way I can think is the detect selection using js, overide the picker with a custom picker and then send selection back to page. Seems complicated so i'm trying to find out if there is an easier/better way?
The data is quite long so I do need to reduce font size. As there are quite a lot of options the drop down much more suitable to radio buttons for instance.
I have noted the quick connect framework but seems like an overkill and this is an app that is already live so I don't really want to add a new framework just for an update.
Any advice?Hi K T thanks for your reply
In the first example of real data that I have used, it is cut off in both orientations. Only one of the options by one character of so but this forces a '...' to be added in the middle and it to be cut off even more.
Ideally I would like to bring the font size down and make it two lines.
Cheers -
Html:select inside logic:iterate
hi,
I am having a string type corresponding to the select attribute in my form bean. Since this select tag is inside the logic:iterate all the names of the select boxes are same. i.e myLabel in this context. So, how can i set the value to select box. do i need to change the data type for labelValue in form bean.
my form bean is given below:
here the listTotal is the total of the combo and listValue is the individual combo
public ArrayList listTotal;
public Collection getListTotal()
return (Collection)listTotal;
public void setListTotal(ArrayList total)
this.listTotal = total;
public ArrayList listValues;
public void setListValues(ArrayList values)
this.listValues = values;
public ArrayList getListValues()
return listValues;
String myLabel;
public String getMyLabel()
return myLabel;
public void setMyLabel(String myLabel)
this.myLabel = myLabel;
And i m setting the values in the action class
ArrayList listTotal = new ArrayList(1);
ArrayList listValues = new ArrayList();
listValues.add(new LabelValueBean("k1", "Value1"));
listValues.add(new LabelValueBean("k2", "Value2"));
listValues.add(new LabelValueBean("k3", "value3"));
listTotal.add(listValues);
listValues = new ArrayList();
listValues.add(new LabelValueBean("l1", "Value4"));
listValues.add(new LabelValueBean("l2", "Value5"));
listValues.add(new LabelValueBean("l3", "value6"));
listTotal.add(listValues);
listValues = new ArrayList();
listValues.add(new LabelValueBean("m1", "Value7"));
listValues.add(new LabelValueBean("m2", "Value8"));
listValues.add(new LabelValueBean("m3", "value9"));
listTotal.add(listValues);
employeeForm.setListTotal(listTotal);
jsp code
<logic:iterate id="listValues" name="EmployeeForm" property="listTotal" indexId="index">
<tr><td>
<html:select property="myLabel" >
<html:options collection="listValues" labelProperty="label" property="value"/>
</html:select>
</logic:iterate>hi,
instead of having it as a array i thought of going for an array list so that the manipulation would be much easier. ok here is my code.
//This is the array list for names of the drop downs.
private ArrayList selectedList;
public ArrayList getSelectedList()
return selectedList;
public void setSelectedList(ArrayList pselectedList)
this.selectedList = pselectedList;
public ListValueVO getSelected(int index)
return (ListValueVO) selectedList.get(index);
}I have already mentioned in my previous posts that i have 3 lists in my form bean. One list for individual combo box. Another list for total number of combo boxes. The third list for the names of the combo boxes. Pls let me know whether i m going in the correct direction or not. -
Hi,
I am having a list of names from DB which I should show in the muliselect box. I have a form bean which has a String array with the names to be shown.
I have written like this...but dont know if im correct
<html:select name="nameForm" property="nameList" multiple="true">
<html:options collection="nameList" property="name" labelProperty="name"/>
</html:select> Now my question is in html select should the attribute property also point to the name of the arraylist. and collection should also point to arralist?
How it should be written...can you please help...
ThanksIn form bean I have
String[] namesList;
public String[] getNamesList(){
xxxxxx ;
public setNamesList(){
xxx;
}in this case the property is also namesList and collections should also point to the list which is namesList. Is this correct? -
Html:select border issue.
Hi,
I am trying to put a border on a dropdownlist. For the dropdown, I am using html:select tag. I tried giving the border using the style attribute in html:select.(<html:select style="border:1px solid red"). It does not seem to be working. Could someone help me out and guide me in the proper direction. Thanks.Are we talking java here? Or is this javascript? If javascript, you know that this is a java forum, and that the two languages are vastly different. If you're asking about java, then sorry, but I'm at a loss to help you as I've never heard of these before.
-
html:select Struts tag problems
hello
I've a bean "Profile" in my sessionScope under name "myProfile"
This bean is defined as
public class Profile implements java.io.Serializable {
private User user;
private List<Groups> groups;
private List<Function> function;
private List<Services> services;
etc. .-.... getter and setter.....
}the "services list" is full of data
now in my jsp I want to print all the services in a select box. I'm using struts so I do
<html:select property="serviceId">
<html:options collection="${myProfile.services}" property="idSoc" labelProperty="descrizione" />
</html:select>it doesn't works..the console says
Cannot find bean under name [it.object.Services@16b5518, it.object.Services@19fdafc]
I've read the documentation.. but I don't understand if in the collection attribute I can put only the name of a bean that identify a collection...
I can't use EL?
I try do use a bean:define and to put its name in the collection attribute
<bean:define id="myBean" value="${myProfile.services}"/>
<html:select property="societaId" >
<html:options collection="myBean" property="idSoc" labelProperty="descrizione" />
</html:select>but it still doesn't work.. it says
Cannot create iterator for [it.object.Services@16b5518, it.object.Services@19fdafc]
what the way to solve this problem
thanks
martina<html:select>
<html:optionsCollection name = "myProfile"
property = "services" value ="idSoc" label =
"descrizione"/>
/html:select>yes evnafets
you're right
this code works!
but there's a problem. To simplify this post I say I've a bean with a Collection inside that I want to iterate.
In my real application I've a session bean with another bean inside that contains the Collection. I've one more level (3 levels instead 2)
whit the code you suggest I can't search inside it...
I mean over myProfile I've onother bean that contains it and it's in the session
bean1 -> myProfile -> List of Services
from the session I can take by name only the "bean1"
do you know what's the solution in this case?
I've used some code like this
<bean:define id="myBean" name="bean1" property="profilo"></bean:define>
<html:select>
<html:optionsCollection name = "myBean" property = "services" value ="idSoc" label = "descrizione"/>
</html:select>it works..as you suggest I can specify only attribute names so I think this is the right way... or?!
thanks a lot for yor help
martina -
Hi all,
In my jsp page i am using struts html:select tag,some contents are not fitting in the alloted size so i want to give horizontal scrolling for this select box,pls any body can tell me which property of select tag can be used,or any html tricks by which i can achive horizontal scrolling.examples will be help full.
thanks,There aren't any tricks. This has nothing to do with Struts or JSP. It only has to to with HTML. The width is controlled by the size of the options or the size of the HTML area it has to display in. The latter if it's restricted otherwise by some table cell's width. I don't believe that I've ever seen a select box which has horizontol scrolling in any browser ever.
-
MY problem is
my html:select
<html:select property = "planetID" size = "1">
<html:option value = "1">one</html:option>
<html:option value = "2">two</html:option>
<html:option value = "3">three</html:option>
<html:option value = "4">four</html:option>
</html:select>
when user vist this page i want[b] three to be selected in html:select
i have tried using
<html:option value = "3" selected>three</html:option> but it is not working
please help me this is urgentIf you want to select an option by default, you should specify it in the struts-config.xml int the form bean.
<form-property name="month" initial="0" type="java.lang.String" /> -
Using html:select with mutiple
hy, guys!I need some help:I am developing a form were I use a heml:select wich have to use the mutiple selecting function( the user could select more then one option)it looks like this:
<html:select property="sectors" multiple="true" size="3" ><html:option value="1">1</html:option><html:option value="2">2</html:option><html:option value="3">3</html:option></html:select>
but when I try to test on the action, getting from the form-bean and printing to test, for example:
SelectForm f=(SelectForm)form;
System.out.println(f.getSectors());
it only prints one of the selected options!!!that means it�s not getting all that is needed!!!what should I do?It doesn't print out all the values because it returns an Array of String objects by default. You need to have getter/setter methods in your FormBean that return String arrays and take String arrays as argument respectively.
Hope that helps.
Regards
Hari
Maybe you are looking for
-
Problem with OpenLDAP and JNDI
I'm having problem working with OpenLDAP and JNDI. First I have changed LDAP's slapd.conf file: suffix "dc=antipodes,dc=com" rootdn cn=Manager,dc=antipodes,dc=com directory "C:/Program Files/OpenLDAP/data" rootpw secret
-
Hi All, Mac Pro 2008 will not start after shutdown straight from sleep! Help!
WILL A NEW LOGIC BOARD SOLVE MY PROBLEM? My early 2008 Mac Pro (2.8, 8-core 22 gigs ram) was shutting down from sleep both when I activated it, and then later by itself. Recently it refused to turn on, shuts down after about 3 seconds, light goes off
-
Video converter/burning software...
What is recommended to prep MP4 to burn to DVD? I have a few MP4 movies I'd like to put on DVD for my grandsons. I have "Burn" but only works on my DVD player on the computer and a few select external DVD players. I just downloaded DVD Cloner but tha
-
need help with MacBook Pro 17inch willnot start apple logo, spining wheel, then gray screen, a circle with digional line through the circle
-
APPLE Macbook error 2869 ¿error with new MAC OS X Leopard?
ENGLISH In the new aluminium Mackbook, when installing the drivers from disk MAC OS X for windows XP SP2, it always appears error 2869. This error is unknown at Support service of APPLE 900 150 503 and also in every cities in Spain, and England, they