1

Hi everybody!

I'm a new intern at Kynetx, and I haven't had much experience actually writing KRL. But I have taken classes in C++ and C#, HTML, and CSS. On my own I have learned a fair amount of PHP (Ewww). Anyway, here's my question:

How do I put HTML in a notification message from KRL? And with HTML links can I then use styling such as a:hover, a:link, etc. to define the link style in the message?

Sorry for the super simple question, but with every language you have to start somewhere right?

Thanks!

flag

1 Answer

3

Here is a really simple example to answer your question:

In your rule:

select using "google.com' setting ()
    pre {
        msg = <<
            <div id="example">
                <p class="notes">This is an example of HTML in a notify window. And this is an example of a <a class="test" href="http://baconsalt.com">link</a> being styled with CSS from the Global block.</p>
            </div>
    >>;
}
notify("Success!, msg)
    with sticky = true;

In the Global block:

css <<
a.test:link,a.test:visited
{
display:block;
font-weight:bold;
color:#FFFFFF;
background-color:#787878;
width:120px;
text-align:left;
padding:4px;
text-decoration:none;
}
>>;

Enjoy!

link|flag

Your Answer

Get an OpenID
or

Not the answer you're looking for? Browse other questions tagged or ask your own question.