$errorsAndAlerts: Two different font styles, or using an image?

3 posts by 2 authors in: Forums > CMS Builder
Last Post: September 19, 2011   (RSS)

Hi there!
I'm trying to code two different font styles (green and red), for two different errorAndAlert messages. The code is:

$errorsAndAlerts .= "Message here <br/>";

and I'm not sure how to name the second message to have a different <div> style

Can I use an image file rather than a text message? I'm not sure on the coding. Thanks for the help!
-Kelly

Re: [Keltam2] $errorsAndAlerts: Two different font styles, or using an image?

By Jason - September 19, 2011

Hi Kelly,

$errorsAndAlerts is just a string variable, so you can add any HTML you want to it.

For example:

$errorsAndAlerts .= "<div style = 'color:red;'>This Message is Red</div> <br/> ";
$errorsAndAlerts .= "<div style = 'color:green;'>This Message is Green</div> <br/> ";


You can also add in html for an image.

Example:

$errorsAndAlerts = "<img src = 'my_error_message.jpg' />";

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/