mySCADA
myDESIGNER › myDESIGNER › Views & Layout

View script func - Other useful funcs

On this page

Custom Alert Dialog

myscada.alert(‘This is alert!’);

You can pass an object into the function, you can control more parameters such as the title text, or pass a function to be called after dialog dismiss.

myscada.alert(‘{type: ‘type-default’, title: ‘Title text’, text: ‘Message’, onHide: function(){

            //code after dialog dismiss

}});

type is of ‘type-default’, ‘type-info’, ‘type-primary’, ‘type-success’, ‘type-warning’, and ‘type-danger’

Interactive examples of different dialog options are nicely illustrated here.

Forced Screen Refresh

To perform a forced screen refresh, call

myscada.repaint();

Replace Hash in text for value

This function will replace all hashes in a text for specified value. Please provide a valid text element and value for replacement.

myscada.replaceValueForHash(‘id’, ‘value’);        //or

myscada.replaceValueForHash([‘id1’, ‘id2’, ‘id3’], ‘value’);

Computing MD5

Get MD5 hash from string

var md5=myscada.getMD5(“data”);