Hi.
In Viewon, how can I place text to flash (blink) acording to a tag?
When you say blink, do you mean that you want the text to appear and disappear frequently?
Hi.
exactly.
I want to signal an alarm with flashing text.
You should be able to do something like this
In the example below, I used a tag called test and when the tag value was 1, it will cause the function below to run
var Blink = getEwonTagVal(“test”);
function blink_text()
{
if (Blink == 1)
{
$(’#UID_1602604805046’).fadeOut(200);
$(’#UID_1602604805046’).fadeIn(200);
}
}
The UID is the ID of the text element that will be blinking
OK. and where I put this script?
thank you.
In this example, the code was written in the whitespace background of a ViewON page
Hi Carlo,
This is Javascript code, not Basic code. It also looks like you wrote this on a tag instead of in the whitespace background
-Tim
Okay, I’m new to this.
Can you explain better where and how to place the javascript?
If you click in the whitespace of a page you should be able to enter a javascript section like in the picture below:
I think you may have the wrong version of quotes used around Var_teste
You are right.
var Blink = getEwonTagVal(“Var_Teste”);
function blink_text()
{
if (Blink == 1)
{
$("#UID_1608054838921").fadeOut(200);
$("#UID_1608054838921").fadeIn(200);
}
}
But the text not blink
Are you getting any errors still or does it just not seem to be working?
Hi.
Gives no errors, just does not work.
thanks.
Try taking it out of the function, just leave the if statement and make sure that your interval isn’t set too low
Great, it works, thank you very much.