0
Passing CSS Styles in a drop-down box
Explorer
,
/t5/dreamweaver-discussions/passing-css-styles-in-a-drop-down-box/td-p/4154
Oct 05, 2006
Oct 05, 2006
Copy link to clipboard
Copied
Hi Guys,
Yes im back again with another problem. I would imagine that some of you out there use Helm to host your websites ? Well you may have noticed the in-built billing system. You will have seen that when you have a positive amount the colour is green and when your balance is red, the text turns to red. Also the drop-down boxes in the billing system and in various other places have green, orange, red for different statuses such as inactive, banned and so on.
I am building a billing system for a website at the mo and i thought it would be a very good idea if i could do something very similar only i am unsure how to pass the colour values into my database. Can i just input the HTML ?
I would really appreciate some guidance on this as its starting to bug me and i've been trying to figure this out for ages!
Thanks a bunch,
Adam
Yes im back again with another problem. I would imagine that some of you out there use Helm to host your websites ? Well you may have noticed the in-built billing system. You will have seen that when you have a positive amount the colour is green and when your balance is red, the text turns to red. Also the drop-down boxes in the billing system and in various other places have green, orange, red for different statuses such as inactive, banned and so on.
I am building a billing system for a website at the mo and i thought it would be a very good idea if i could do something very similar only i am unsure how to pass the colour values into my database. Can i just input the HTML ?
I would really appreciate some guidance on this as its starting to bug me and i've been trying to figure this out for ages!
Thanks a bunch,
Adam
TOPICS
Server side applications
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
LATEST
/t5/dreamweaver-discussions/passing-css-styles-in-a-drop-down-box/m-p/4155#M194541
Oct 05, 2006
Oct 05, 2006
Copy link to clipboard
Copied
Create the styles for your statuses in your site css
e.g.
.redstyle{
background-color: red;
}
.greenstyle{
background-color: green;
}
Then in the loop which displays the records from the DB check the status of
the DB column and apply the style accordingly
e.g.
If rs.Field.Item("ammount").Value > 0 Then
Response.Write("class=greenstyle")
Else
Response.Write("class=redstyle")
End If
Regards
Bren
Why do I climb mountains? Simple! because they are there
www.3peakschallenge.co.uk
e.g.
.redstyle{
background-color: red;
}
.greenstyle{
background-color: green;
}
Then in the loop which displays the records from the DB check the status of
the DB column and apply the style accordingly
e.g.
If rs.Field.Item("ammount").Value > 0 Then
Response.Write("class=greenstyle")
Else
Response.Write("class=redstyle")
End If
Regards
Bren
Why do I climb mountains? Simple! because they are there
www.3peakschallenge.co.uk
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

