Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

VD label value in html page


Question

Posted

A virtual device has several labels to show messages sent by scenes.
I tried to create a html page to show these messages with iframes like this one

<iframe id="ifr1" src="

Please login or register to see this link.

width="800" height="30"></iframe>

Inside the iframe I get not only the value of the label, but this:

{"value":"Das ist ein ziemlich langer Text, und zwar der Text mit der Nummer 1","modified":1440576701}

How can I get only the "real" value of a label in a html page?

Or how can I get this '{"value" .... }' as a string and then with javascript ... ?
 

3 answers to this question

Recommended Posts

  • 0
Posted

You should parse json to some format that will be usable in your code

  • 0
  • Inquirer
  • Posted

    Dear Mr. Nowacki,

     

    thank you for the hint (now I know how to use json.parse),

    but now I have a bigger problem:

     

    How to 'import' the "{...}" object from my HC2 ( it's a VD label value ) into a javascript variable within my html code ?

     

    Thanks in advance!

    • 0
  • Inquirer
  • Posted

    Hurra!

    in principle I've got it

    - end -

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...