Jump to content
ThomasGutzler

Turn your front panel into an interactive HTML5 site

Recommended Posts

On ‎1‎/‎15‎/‎2019 at 4:07 PM, ludo35 said:

Hi, for server address, I put localhost and I have page one running.

Ludo

Ok, and if you click on the Next page button, nothing happens. Correct? Or do you receive an error message?

Share this post


Link to post
Share on other sites
23 hours ago, ludo35 said:

Exactly, no ihm but file Under explorer match with page 2.

Ok, I see. Why don't you contact me in private so that we may analyze the issue, find the solution and post it to the general forum. I fear that we fulfil the forum with this problem otherwise….

Thanks

Share this post


Link to post
Share on other sites

Hi Hooovahh,

do you think normal that progressbars  work only as indicators? I tried to use them (a simple numeric slide) to simulate a scrollbar in an array indicator but it did not work. Even if configured as VALUE ONLY or VALUE AND VISIBILITY, the control did not respond to change requests, as if it was only an image…. When value was changed from LabVIEW side the change was read, instead.

My fault or something odd in the control behavior?

Thanks for your help

Share this post


Link to post
Share on other sites

Hello everyone,

I made a very light update.

Up to now a background image to the front panel was not allowed.

I added this possibility by modifying the HTML generated by the HTML JS Template.vi file (attached below).

When the function "show border" is not enabled (if you want a border, maybe, you dislike to have a background image…) you might underimpress an image defined in the "bkgrnd dim" control. Size and filename are requested by this control. Of course, the image name must be expressed in html mode (considering the generated html file as root folder).

If someone wants to use this option must bring out the added control to the preferred main vi.

Hope it might be helpful

HTML JS Template.vi

Share this post


Link to post
Share on other sites

Hello hoovahh,

the Force Update.Vi dosent support multiple Pages. i mean it will force the update in all webpages of the last VI been called

 

do you have any idea what could be causing the Problem.

 

best regards

Edited by K4zz

Share this post


Link to post
Share on other sites
5 hours ago, Flavio Formica said:

do you think normal that progressbars  work only as indicators?

Nope, at the moment the progress bar is an indicator only.  It can be value only, which will use the web control made in javascript so the appearance will be slightly different, but there is no way at the moment to interact with it.  If you understand JS better than me, then you could probably add the control functionality.

As for the background image I've never had a need for that, but I can see that it might be useful.  One option might be to just place a 2D picture control behind all other controls on the front panel, and load it with an image.  It should default to Image Only mode, and if I did the Z order stuff properly it should work, but to be clear I never tried using that control.

Share this post


Link to post
Share on other sites

Ok Hoovahh, I tried your solution several times but the z-order was not correct and the background image was displayed as top-most. More than that, I found that any image is displayed in a higher layer than any interactive control. For this reason I tried to work on HTML level and found that solution.

Unluckily I'm not so expert in JSs, so I'm not able to act at that level. Nevertheless, I will try to find where the z-order is set and change it. I'll let you know my progresses.

Thanks

Share this post


Link to post
Share on other sites

Join the conversation

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

Guest
Reply to this topic...

×   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.


  • Similar Content

    • By drjdpowell
      View File JSONtext
      Package for working with JSON.  Uses high-speed text parsing, rather than building an intermediate representation as with prior LabVIEW JSON libraries (this is much faster).  Allows easy working with "subitems" in JSON format, or one can convert to/from LabVIEW types.  Uses the new "malleable VIs" of LabVIEW 2017 to convert to any LabVIEW type directly.
      JSON text makes use of a form a JSON Path notation, allowing easy and rapid access to the subitems of interest.
      Requires LabVIEW 2017 and install by VIPM 2017 or later.
      Original conversation about JSONtext.
      Now on the LabVIEW Tools Network.
      Copyright 2017 JDP Science Limited
      Submitter drjdpowell Submitted 08/02/2017 Category General LabVIEW Version 2017 License Type BSD (Most common)  
    • By drjdpowell
      View File JSON LabVIEW
      JSON is a data interchange format (sometimes compared to XML, but simpler). There are multiple projects to create a JSON package for LabVIEW. This is yet another one motivated by this hijacked conversation originally about a different project to convert JSON into LabVIEW Variants.

      This project uses a set of LVOOP classes to match the recursive structure of JSON, rather than variants. It allows conversation to and from JSON. All functionality is available through two polymorphic VIs: Set and Get. In addition to Get and Set VIs for common data types, one can also convert directly to or from complex clusters via variant-JSON tools.

      Copyright 2012-2016 James David Powell, Shaun Rumbell, Ton Plomp and James McNally.
      [Note: if you are using LabVIEW 2017, please also see the JSONtext library as a an alternative.]
      Submitter drjdpowell Submitted 10/04/2012 Category General LabVIEW Version  
    • By ThomasGutzler
      Hi,
      I'm receiving a JSON string from a web API, which I'm trying to convert into a cluster (of clusters) but I've run into some problems:
      1) Sometimes the order of the elements in the JSON string changes, which causes my conversion to fail.
      2) Sometimes the "object" returned via JSON is null, which causes my conversion to fail if I use clusters within clusters. It works with variants in clusters but then I need to convert the all the variants manually
      Is there any way to improve my code to fix those problems? The attached snippet is a simplified version. In my project, the first JSON string to data is done in a library. The second conversion from "result" variant to data is done in my application. This makes a direct conversion from JSON string more difficult.

    • By drjdpowell
      Package for working with JSON.  Uses high-speed text parsing, rather than building an intermediate representation as with prior LabVIEW JSON libraries (this is much faster).  Allows easy working with "subitems" in JSON format, or one can convert to/from LabVIEW types.  Uses the new "malleable VIs" of LabVIEW 2017 to convert to any LabVIEW type directly.
      JSON text makes use of a form a JSON Path notation, allowing easy and rapid access to the subitems of interest.
      Requires LabVIEW 2017 and install by VIPM 2017 or later.
      Original conversation about JSONtext.
      Now on the LabVIEW Tools Network.
      Copyright 2017 JDP Science Limited
    • By drjdpowell
      JSON is a data interchange format (sometimes compared to XML, but simpler). There are multiple projects to create a JSON package for LabVIEW. This is yet another one motivated by this hijacked conversation originally about a different project to convert JSON into LabVIEW Variants.

      This project uses a set of LVOOP classes to match the recursive structure of JSON, rather than variants. It allows conversation to and from JSON. All functionality is available through two polymorphic VIs: Set and Get. In addition to Get and Set VIs for common data types, one can also convert directly to or from complex clusters via variant-JSON tools.

      Copyright 2012-2016 James David Powell, Shaun Rumbell, Ton Plomp and James McNally.
      [Note: if you are using LabVIEW 2017, please also see the JSONtext library as a an alternative.]
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.