Discussion:
Open Local HTML Doc within vi
(too old to reply)
Joe John
2008-08-11 13:40:06 UTC
Permalink
I am trying to open a local html document with in a vi. I am using an activex web broser and I keep getting a script error. If I open the document within IE it works fine. I've attached the html code. Maybe someone can help me open this file within a vi.
change the extension on the attached file to .html


cam-code.jpg:
Loading Image...
Pnt
2008-08-11 13:40:08 UTC
Permalink
I can not open your html file with IE
Pnt
2008-08-11 14:10:07 UTC
Permalink
Try the Report Generation.....HTML Reports Only.....Open HTML report in Browser.
Works for me.
Joe John
2008-08-11 14:10:08 UTC
Permalink
Sorry,
unzip the files below into a folder and open it from there.


HTML.zip:
http://forums.ni.com/attachments/ni/170/348253/1/HTML.zip
Joe John
2008-08-11 14:10:08 UTC
Permalink
I tried that. It opens the html code in another window. I need to embed this html code into my vi.
Pnt
2008-08-11 17:10:08 UTC
Permalink
I think you need the internet address to which the html is link to.
Do you know it ?
(It should be a way to find out myself, although i don't know it)
smercurio_fc
2008-08-11 18:40:09 UTC
Permalink
Pnt wrote:
I think you need the internet address to which the html is link to.I don't completely understand what this is supposed to mean. That information is already in the HTML code. For instance, the <script> tags indicate the source for some of the JavaScript. As for the issue at hand, I get scirpt error when I load the page in IE, so I don't believe the problem is with LabVIEW, but rather with the JavaScript. My JavaScript is fairly poor. However, the lines    var cf = document.forms[0];    var vs = document.getElementById("v_play");do not actually create valid values for those variables. If you put a couple of alert statements to see the values you will see they are null. There also seems to be a chunk of code that's sitting between the set_Video and dw functions all by itself.
Joe John
2008-08-11 19:10:06 UTC
Permalink
I seem to get a script error in IE but not in Firefox. Is there a plugin I'm missing for IE?
drewsky
2008-08-11 19:40:07 UTC
Permalink
I don't know if this is the same as your using, but the attached code works for me.


Open File.vi:
http://forums.ni.com/attachments/ni/170/348412/1/Open File.vi
Joe John
2008-08-11 19:40:08 UTC
Permalink
That is pretty much the same code I have. If I try and use your code to open my html file, I get a script error. If I open the script using firefox it works. If I open it useing IE , script error!
drewsky
2008-08-12 00:10:05 UTC
Permalink
wow, that is weird, I've never had a problem... I guess I'll try to do some research.
Continue reading on narkive:
Loading...