1. JSFormStyle

    Article: AN0001716Updated: 09.11.2018

    Object for work with styles in the form.

    Object properties

    Name Description
    void Add(string style) Function for adding one style into a page.
    void AddUrl(string url) Function for adding a link to an external css file with styles. Link is added to the page.

    Use the function Add, if you want to add into a page with form a style, that is being changed based on various conditions or you do not want to create a special file for it.

    Use the funkci AddUrl, if you have more styles, that are not changing or you want to use them on more pages.

    Example

    Inserting styles directly into the page. This approach increase the page size. Therefore, use it only for styles, that are changing according to the context. Otherwise, use the second option.

    OGForm.Style.Add('background-color: red;');

     

    This script will insert into the page link to exteranal file with styles.

    OGForm.Style.AddUrl('http://www.mycompany.cz/mystyle.css');

×