1 Reply Latest reply on Sep 9, 2013 2:21 AM by Kutir Mobility

    problems with color of HTML select options on MinMobile

    Alexey Mironov

      Hi, I use code


          <select  size="1" name="LOC" id="LOC">  
          <%  @TsdInventlocations = TsdInventlocation.find(:all) 
              @TsdInventlocations.each do |location| %>
              <option value="<%= location.InventLocationId %>" <%if (location.InventLocationId == @last_loc)%><%= 'selected' %><%end%>><%= location.InventLoationName %></option>


      just select control.


      In rhosimilator font color of the options is black (on white) and so good. But on real device MC3110 it was white (on white) and i can read anyone...


      Have anybody proplem as it?

        • Re: problems with color of HTML select options on MinMobile
          Kutir Mobility

          Here are two things you can try:


          - first of all, check that you have a closing </select> tag, add it if you don't have it

          - if you have it and the elements still appear as white on white, try to remove all your code from the <select> tag and add two hardcoded elements:


          <select  size="1" name="LOC" id="LOC"> 

          <option value="1">location 1</option>

          <option value=2" selected>location 2</option>


          Now run your application again, if they are still white on white, it could be that some CSS is setting that color, you would have to check your css files and see if there is anything that sets text to be white.

          Unrelated to the above, there is something you can use to make your code more readable: you can embed html directly inside <% if ... %> <% end %> without using <%= %>. For example:


          <%if (location.InventLocationId == @last_loc)%>



          <%= location.InventLoationName %>


          (also, note that there appears to be a typo in "location.inventLoationName", it looks like a "c" is missing in inventLocationName)



          Kutir Mobility