html/css in displayType 'HTML-area'

Questions and answers for designing and implementing forms in Servoy

html/css in displayType 'HTML-area'

Postby koen1330869547 » Thu Sep 03, 2015 5:41 pm

I got a little html/css question: I want to force uppercase & lowercase in the same ‘html-area’, but this doen’t work :(

var string = '<html><head><style>p.uppercase {text-transform: uppercase;}p.lowercase {text-transform: lowercase;}p.capitalize {text-transform: capitalize;}</style></head><body><p class="uppercase">This is some text.</p><p class="lowercase">This is some text.</p><p class="capitalize">This is some text.</p></body></html>';
return string;

Servoy 7.4.3
source: http://www.w3schools.com/cssref/tryit.a ... -transform

Any tips?
Thanks!
Koen Cloostermans
User Centered Designer
koen1330869547
 
Posts: 10
Joined: Sun Mar 04, 2012 3:59 pm
Location: Luxembourg

Re: html/css in displayType 'HTML-area'

Postby mboegem » Thu Sep 03, 2015 8:39 pm

Hi Koen,

is this smart- or webclient?
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image

Partner of Tower - The most powerful Git client for Mac and Windows
User avatar
mboegem
 
Posts: 1743
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: html/css in displayType 'HTML-area'

Postby koen1330869547 » Thu Sep 03, 2015 10:39 pm

It is the smart client
Koen Cloostermans
User Centered Designer
koen1330869547
 
Posts: 10
Joined: Sun Mar 04, 2012 3:59 pm
Location: Luxembourg

Re: html/css in displayType 'HTML-area'

Postby mboegem » Fri Sep 04, 2015 8:36 am

Hi Koen,

sorry to tell you, but this will most probably just not work in smart-client.
html/css versions supported in java are outdated (already 7 years ago, imagine what it is now :-( )
and I believe implemented versions are even a subset of what it should be capable of.

You could try to rewrite it using inline styles, sometimes this could solve it.
Otherwise: could you do this using a calculation?
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image

Partner of Tower - The most powerful Git client for Mac and Windows
User avatar
mboegem
 
Posts: 1743
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: html/css in displayType 'HTML-area'

Postby koen1330869547 » Fri Sep 04, 2015 3:45 pm

Thank you Marc,

You helped me 'Think outside the html/css-Box!'
and look inside the javascript-box :D

----
This is some Text.
THIS IS SOME TEXT.
this is some text.
firstname LASTNAME
----
Code: Select all
function test_html()
{
   var text = '';
   var string_html = '<html><body>';
   text = 'This is some Text.';
   string_html = string_html + '<p>' + text + '</p>';
   text = text.toUpperCase();
   string_html = string_html + '<p>' + text + '</p>';
   text = text.toLowerCase();
   string_html = string_html + '<p>' + text + '</p>';
   text = 'firstname';
   string_html = string_html + '<p>' + text;
   text = ' lastname';
   text = text.toUpperCase();
   string_html = string_html + '<a style="font-weight: bold">' + text + '</a></p>';
   string_html = string_html + '</body></html>';   
   return string_html;
}
Koen Cloostermans
User Centered Designer
koen1330869547
 
Posts: 10
Joined: Sun Mar 04, 2012 3:59 pm
Location: Luxembourg


Return to Forms

Who is online

Users browsing this forum: Google [Bot] and 6 guests