Smartphones, Tablets, and Mobile Devices Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Can you use DIVs with LabVIEW Front Panels

I am relatively new to LabVIEW and I am running in to a problem building my interface into a webpage. A National Instruments employee I was working with suggested this group might help. If this is not the correct group please let me know.

The problem I am having is that I need to position a <div id=”video”> above the LabVIEW front panel (also living in a <div class=”LabVIEW”>) that is served up using a web page and the LabVIEW server. When I comment the LabVIEW front panel out, the layout works just fine. However, when the LabVIEW front panel is present it is like all the divs vanish. For your informaton I used an id for the video div because I will be applying some Javascript with getElementById. Here is the code I am using:

CSS:

#video {

background-color:#0276FD;

width:410px;

height:280px;

position:absolute;

left:300px;

top:50px;

z-index:2;

}

.LabVIEW {

background-color:#FF0000;

width:750px;

height:585px;

position:absolute;

top:25px;

right:0px;

z-index:-1;

}

HTML:

<div class=”content”>

<div class=”LabVIEW”>

</div>

<div id=”video>

</div>

</div>

My first question would be, can you even use divs with a LabVIEW front panel? Is there something I need to do with/to the front panel? Am I just blind and I am missing something simple? Any help you can provide would be greatly appreciated by me and the community college students I am severing.

0 Kudos
Message 1 of 10
(4,587 Views)

What do you mean by 'building my interface into a webpage"? How are you doing this? Are you using the Web Publishing Tool?

0 Kudos
Message 2 of 10
(2,399 Views)

I started with the web page the web publishing tool gave me then I added additional HTML to it.

0 Kudos
Message 3 of 10
(2,399 Views)

The web publishing tool as far as I know does not use a class="LabVIEW" attribute anywhere. I tested it yesterday just to be sure, and it was just an "object" tag and an "embed" tag (to cover different browsers).

Are you sure you're using the same Web Publishing Tool? I'm talking about the built-in tool which comes with LabVIEW. You access it by choosing "Web Publishing Tool..." from the LabVIEW "Tools" menu. It has options for "embedded", "snapshot", or "monitor". The latter two are just images. The first one uses a plugin.

If you're using a different tool then it may be a third party tool. Are you maybe using something like LabSocket (http://labsocket.com/)?

0 Kudos
Message 4 of 10
(2,399 Views)

Yes, I am sure I used the web publishing tool. As I said I started with the web publishing tool. Then I added HTML to the page the web publishing tool created, one of the pieces of HTML I added was a DIV with the class="LabVIEW" as a wrapper around the the front panel. I added most of the additional HTML by hand in notepad as that is what the computer I am using at work has.

0 Kudos
Message 5 of 10
(2,399 Views)

Ok, I guess I just misunderstood your question. I would guess that the problem isn't that you wrapped the plugin object in a div, but it could be that the browser doesn't handle that plugin being under other content. Does it work if you just put it in a div but don't try to overlay another div on top of it?

0 Kudos
Message 6 of 10
(2,399 Views)

Actually, the front panel always works it is the div I am trying to put above the front panel that does not. If I comment out (<!-- these tags tell the web browser not to render what is between them -->) the embedded front panel then the video div renders fine if I remove the comment tag and let the front panel render then the video div disappears. It appears to me to be the front panel interfering with the HTML not the HTML interfering with the front panel.

0 Kudos
Message 7 of 10
(2,399 Views)

That is really what I mean. The LV plugin probably doesn't interact well with other plugins trying to show on top of it. I don't know if that's a deficiency of our plugin or with the plugin system itself. You could try removing the front panel while the video is showing, or maybe hiding it (since it's covered anyway). I don't think we (as in the people who frequent this forum) are going to be able to help you much, though. Sorry.

0 Kudos
Message 8 of 10
(2,399 Views)

Thanks, I am fairly certain the problem is with the LabVIEW front panel, as I have used this same HTML code successfully in lots of other places. I was just hoping someone might have found a work around. Thanks for your time.

0 Kudos
Message 9 of 10
(2,399 Views)

You should be able to do this with WebPager - one can add custom HTML/JavaScript/CSS code. There are a few examples with custom code.

0 Kudos
Message 10 of 10
(2,399 Views)