NetTalk Central
Toggle navigation
Login
Register
×
Welcome,Guest
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
NetTalk Central
»
NetTalk Web Server
»
Web Server - Ask For Help
»
conditional change content css on browse
« previous
next »
Print
Pages: [
1
]
Author
Topic: conditional change content css on browse (Read 4503 times)
olu
Sr. Member
Posts: 352
conditional change content css on browse
«
on:
July 19, 2012, 09:47:26 PM »
Hello please can anyone help, i would like to change a browse cell content background color rater than the whole <td> color as it does at the momement when i use the browse conditional option.
Logged
Bruce
Global Moderator
Hero Member
Posts: 11244
Re: conditional change content css on browse
«
Reply #1 on:
July 19, 2012, 09:54:28 PM »
there are 2 CSS settings for a browse cell (actually more than 2, but 2 matter.)
One is for the "Cell" - the other is for the "Contents".
So you're free to set the background color for either, as you prefer.
cheers
Bruce
Logged
olu
Sr. Member
Posts: 352
Re: conditional change content css on browse
«
Reply #2 on:
July 19, 2012, 11:01:18 PM »
hi bruce that works if i just want to change the content css to default value but i want it to change depending on a field vaule
Logged
Bruce
Global Moderator
Hero Member
Posts: 11244
Re: conditional change content css on browse
«
Reply #3 on:
July 20, 2012, 02:11:31 AM »
you can put an expression in that field, using CHOOSE, or calling your own function, or whatever. So you can easily make it dependent on whatever condition you like.
For example
Choose(inv:paid=0,' Red',' Green')
Logged
olu
Sr. Member
Posts: 352
Re: conditional change content css on browse
«
Reply #4 on:
July 20, 2012, 04:44:10 AM »
Hi bruce thanks for the reply i try using the Choose as advice but the only problem with using tha is that my conditions are not true ofr false but more like
gg:type = 'Single'
gg:type = 'Double'
gg:type = 'None'
And each of this will change their colour.
Logged
Johan de Klerk
Full Member
Posts: 217
Johan de Klerk
Re: conditional change content css on browse
«
Reply #5 on:
July 20, 2012, 06:34:26 AM »
You can have something like this:
Choose(gg:type = 'Single',' Red',Choose(gg:type = 'Double','Blue','Green'))
Regards
Johan de Klerk
Logged
Clarion 10, NT 11.57
Bruce
Global Moderator
Hero Member
Posts: 11244
Re: conditional change content css on browse
«
Reply #6 on:
July 20, 2012, 06:38:50 AM »
or - more elegantly - just make a small source procedure that takes whatever input, and returns the name of the class to use.
Logged
olu
Sr. Member
Posts: 352
Re: conditional change content css on browse
«
Reply #7 on:
July 20, 2012, 07:37:28 AM »
Thanks bruce and johan, i have gone with bruce's idea and got it working.
Logged
Print
Pages: [
1
]
« previous
next »
NetTalk Central
»
NetTalk Web Server
»
Web Server - Ask For Help
»
conditional change content css on browse