How do I use User Text strings as persistent storage to save data

Version 2

    Verified Product Versions

    Wavelink Naurtech CETerm 5.7

    Providing free, unrestricted access to the device registry can be a major security hole. Hence we have provided an alternative persistence storage mechanism via User Text strings for our Web Browser.

     

    User Text strings are any strings that you normally configure in our product under Session -> Configure -> Options -> Configure Keybars and Keys -> User Text. There are 64 text (Text 1 through Text 64) strings available. Each string can be up to around 2K in length, however we recommend to compress data values and keep each string usage to be small. You should also leave some text strings for possible key remapping, if necessary.

     

    Below is a sample persistantstorage.htm page for you provided as an example. You can drop this on the device to demonstrate how you may use to "Save" and "Get" data from User Text strings, which are maintained in the registry.

     

    <html>

    <head>

    <title>

    Persistant Storage

    </title>

    </head>

     

    <body bgcolor="#FFFFFF">

    <OBJECT ID="CETerm" CLASSID="clsid:D14943BD-4900-453E-8582-725F21A57E0C" HEIGHT=0, WIDTH=0>

    </OBJECT>

     

    <form id="PFT" name="PFT">

    Naurtech CETerm Persistant Storage

    <br>

    <br>

    <br>

    <a href="Javascript:save();"><b>Save data to User Text 1:</b></a>

    <br>

    <br>

    <a href="Javascript:fetch();"><b>Get data from User Text 1:</b></a>

    <br>

    <br>

    <br>

    <input id="usertext" name="usertext" size="20">

    <br>

    <script language=javascript>

    function save()

    {

        document.CETerm.SetProperty( "app.usertext.1", document.PFT.usertext.value );

    }

     

    function fetch()

    {

        document.PFT.usertext.value = document.CETerm.GetProperty( "app.usertext.1" );

    }

    </script>

    </form>

    </body>

    </html>