For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 5 replies, 4 voices, and was last updated 12 years, 7 months ago by
Unknown Author.
-
AuthorPosts
-
rescuediverMemberI am having a problem with the color of Text in List Items… During design time I can change the color of the text to any color and any size. But during run time when my Javascript fills the ListItems with text, the Text is always grey, with a Font size of 17
I just want the text to be Black, but obviously setting this property during design is not working
Any Help… greatly appreciated
August 13, 2013 at 4:46 pm #341461
support-octavioMemberWe determined that the root of the problem is in the many new styling customizations introduced in Mobione 2.1. Thus your javascript is generating list-items that do not conform to the 2.1 list-item implementation.
Adding the new css classes used in 2.1 on your list code generation should fix the problem. See attached image.
' <div id="m1-list-text2" class="m1-text m1-font-2 m1-active-color-1">Item-' + i + '</div>'+Let me know how it goes and if you need further assistance.
Attachments:
You must be logged in to view attached files.August 15, 2013 at 2:07 am #341495
rescuediverMemberHello Thanks for the help…
I am currently using Mobo 2.3.2
I should explain better…
In the design center I created a list with 3 blank list Items. And have set their Font color to Black in the properties section.
My javascript merely adds text to the list items that have already been generated in the design center.
Here is my only code concerning the listitem text
document.getElementById(“m1-Untitled1-listItem1″).innerHTML=dealer[0].Bigname+” : “+dealer[0].distance.toFixed(2)+” NM”;
Do I need to modify a CSS file that was generated by the DesignCenter?
Thanks
P.S. I love the puzzles in the Key Captcha thingy
August 16, 2013 at 4:45 pm #341572
support-michaelKeymaster@rescuediver
There is an issue with your code snippet.Here is an example (see attachment below). Let’s say you have a list-item with a Text label widget (default) that has the id=”text1″.
See attachment list-item-ss1.pngI can replace the Text widget’s content with a snippet of jquery javascript code similar to the following.
//Find the html element (a <div>) who's ID ends with the string 'text1'. //Then update the element's text. $('[id$=text1]').text('hello world')See attachment list-item-ss2.png
Src code
See attachment test.mobiAttachments:
You must be logged in to view attached files.August 17, 2013 at 10:55 am #341580
rescuediverMemberHello Support,
I don’t know why using standard Javascript doesn’t work but using the JSQuery statement did work.
At this point I don’t care… I am happy to have my problem solved, and now I must learn how to use JSQuery!!
Thank You Very Much!!!!
August 17, 2013 at 11:32 am #341581
Unknown AuthorParticipantFor dynamic lists, you can hard-code
<FONT COLOR=Whatever></FONT>to get the right text color – or even change text color between list items.
-1TC
-
AuthorPosts
