NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Robert Iliuta on June 03, 2012, 02:18:02 AM
-
Hallo,
Is there any way that we could inject xHtml code in a Drop List?
For the moment I see that DropList doesn't support xHtm :-(
Thank you,
Robert
-
what sort of xHtml are you thinking of Robert?
The drop list is using a <select> element in html. Perhaps post some example of a select here (ie the raw html) so I can see what you have in mind?
cheers
Bruce
-
I would like based on a condition to have entries red or green.
Very easy to do in a browse but not in a drop list. DropList doesn't like xHtml on value. I have a drop list and I would like to make entries red for inactive and green for active. Users like this :o)
I try to inject xHtml on values but doesn't work...
Thank you,
Robert
[attachment deleted by admin]
-
those look like css sttings, not html. what html were you planning to inject to get this effect? Or are you really asking about CSS?
cheers
Bruce
-
you can set the CSS for a line in the drop-list, on the CSS tab for that field. The entry to look for is
Drop Part:
Of course you can put an expression in here - as always - so I put in
choose(random(1,10)>5,'red','green')
and got a colorful drop-down like your screen-shot.
I'm guessing you have a slightly more clever expression, but the technique seems right.
cheers
Bruce
-
Hallo Bruce,
It's working great!
The only thing it's that I lose green bar effect...
Thank you,
Robert
-
I haven't tested, but you might get to keep the greenbar effect if you "append" the class, rather than "replace" it. ie set the class name with a leading space. as in;
choose(random(1,10)>5,' red',' green')
Bruce
-
Bruce!
You are the best! :)
/Robert