This topic is locked

$message - change background colour

11/30/2008 3:53:52 PM
PHPRunner General questions
L
Lisa2006 author

Hi Forum,
I have some code in my Edit Page | Before record updated Event.
I need a way to change the background colour using the $message variable when the condition is met.
if blah blah ...

$message = "<font color=#FF0000>" . "<strong>" . "Completed" . "</strong>" . "</font>";

return true;
Assume background colour is #FFCC99
Thank you in advance
Lisa

J
Jane 12/1/2008

Hi,
try to use this one:

$message = "<font style=\"color:#FF0000;\">" . "<strong>" . "Completed" . "</strong>" . "</font>";

return true;

L
Lisa2006 author 12/1/2008

Hi,

try to use this one:


Thanks for the reply Jane.
The solution provided simply changes the colour of the text. I need a way to change the background colour to say #FFCC99
Look forward to your reply.
Lisa

J
Jane 12/1/2008

Hi,
here is a sample:

$message = "<font style=\"background:#FF0000;\">" . "<strong>" . "Completed" . "</strong>" . "</font>";

L
Lisa2006 author 12/1/2008

Hi,

here is a sample:


Hi Jane,
I think we have our wires crossed.


I need to change the background colour of the blue bar as shown by the green arrow to say #FFCC99
Hope this clears things up.
Thanks
Lisa

J
Jane 12/1/2008

Hi,
you can use DIV instead of FONT in your code:

$message = "<div style=\"background:#FF0000;\">" . "<strong>" . "Completed" . "</strong>" . "</div>";

L
Lisa2006 author 12/3/2008

Hi Jane,
Having problems with the following:
$message = "<p align=\"center;\">" . "<strong>" . "<font style=\"color=#FF0000;\">" . "Wrong File Format" . "
" . "or" . "
" . "Cannot Upload an Empty Image" . "</font>" . "</strong>" . "</p>";
Cannot seem to make the 3 line appear centrally. Currently all 3 lines appear aligned to the left.
Your help and support would be much appreciated.
Lisa

J
Jane 12/4/2008

Hi,
don't add semicolon to the align parameters:

$message = "<p align=\"center\">" . "<strong>" . "<font style=\"color:#FF0000;\">" . "Wrong File Format" . "
" . "or" . "
" . "Cannot Upload an Empty Image" . "</font>" . "</strong>" . "</p>";


Also I recommend you to check HTML and CSS manuals:

http://www.w3.org/MarkUp/

http://www.htmlcodetutorial.com/