LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Firefox problems with Open URL vi

I am using Open URL in Default browser to display the contents of a file.

If IE is the default browser and the file is xyz.htm it works but not if the file is xyz.html.

On the other hand if Firefox is the default browser it works if the file is xyz.html but not if the file is xyz.htm.

One further "quirk" with Firefox is that Firefox must be running for the file to display. If Firefox is not running Firefox starts but then instead of displaying the file I want it goes to a web site that sells Czech language books!

Is there any way I can resolve these differences? Can I find out what is the default browser? Can I see if Firefox is already running? Any suggestions?

Note: this is all in windows. I haven't tried it yet in Mac OS.

David
0 Kudos
Message 1 of 6
(4,933 Views)
Hi david,

Why firefox?? what about internet explorer browser??. I did also some web applications with LabVIEW long time ago and internet explorer
was the browser I used.
Good luck.

Ohiofudu
CLAD
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 2 of 6
(4,919 Views)
What LabVIEW really needs is a native web browser control.  Then one control would open a web page from the PC, Mac, Linux, and PDA.  That would make all of this moot.

Until then, you are opening via ActiveX, right?  Opening Firefox with the wrong page could be solved as easily as opening it, then delaying, then opening the desired page.  you might have to experiment with the delay value to get it right.

I hope that this helps,
Bob Young

0 Kudos
Message 3 of 6
(4,916 Views)
I think you're referring to the "Open URL in Default Browser" that you access from the Function Palette->All Functions->Application->Help subpalette. That VI is a simple wrapper around the "Open URL in Default Browser core" VI. Basically, to get it to work with Firefox you need to bypass the "Search and Replace" operation that it's doing, and then append a space to the URL that you enter and feed that directly to the "Open URL in Default Browser core" VI:



This will still work if IE is the default browser

Message Edited by smercurio_fc on 08-07-2006 11:14 AM

0 Kudos
Message 4 of 6
(4,902 Views)

@BOB Y. wrote:
What LabVIEW really needs is a native web browser control.  Then one control would open a web page from the PC, Mac, Linux, and PDA.  That would make all of this moot.

Until then, you are opening via ActiveX, right?  Opening Firefox with the wrong page could be solved as easily as opening it, then delaying, then opening the desired page.  you might have to experiment with the delay value to get it right.

I hope that this helps,
Bob Young






Hi Bob,

thanks for the reply. No, I am NOT using ActiveX. I am using the Open URL in Default Browser.vi from the Application Control/Help pallete. I thought that this would provide the "native web browser control" functionality you wrote about.

I really want to avoid going to ActiveX because of its complexity and lack of platform independence.

Regards,

David
0 Kudos
Message 5 of 6
(4,898 Views)
I forgot to mention: the reason for adding the space is that when Firefox gets the URL the last character gets chopped off. So, if you were using the stock "Open URL in Default Browser core" VI and had fed "http://www.cnn.com" to the "URL" control, Firefox would actually get "http://www.cnn.co", which can't be resolved. So, adding a space allows Firefox to get the full URL. That's why xyz.html works, but xyz.htm doesn't. For "xyz.htm" Firefox would get "xyz.ht", but for "xyz.html" Firefox would get "xyz.htm", which is still valid.

Unfortunately, due to the Replace String function that's being done in the wrapper "Open URL in Default Browser core" VI, if you were to provide "http://www.cnn.com " (with a space), this would get translated to "http://www.cnn.com%20", which seems to get Firefox all confused and you end up getting weird results. On one I got a PDF from some Russian company! So, you just need to use the alternate wrapper that I had shown in my previous post.
Message 6 of 6
(4,893 Views)