Was this page helpful?

Get JS element with regular expression

    Table of contents

    Description

    If the element ID changes everytime you reload the page, it is not possible to use getElementById() function to get what you want. Here we explain how to use the RegEx in InjectJS() function.

    Note : This solution is not compatible with IE8 or earlier, nor with any later versions run in compatibility / legacy mode.

    Code(s)

    Instead of the normal code generated by Wizard :

    reference to undefined name 'syntax' Une exception de type 'MindTouch.Deki.Script.Runtime.DekiScriptUndefinedNameException' a été levée. (click for details)

    You will need to replace it with the code below :

    reference to undefined name 'syntax' Une exception de type 'MindTouch.Deki.Script.Runtime.DekiScriptUndefinedNameException' a été levée. (click for details)

     

    Example(s)

     

    See also

     

    Was this page helpful?
    Tag page (Edit tags)
    • No tags
    Page statistics
    3268 view(s), 5 edit(s) and 1046 character(s)

    Comments

    You must login to post a comment.

    Attach file

    Attachments