Invoke Windows App via Image Click

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
James-S
Profound User
Posts: 61
Joined: Tue Jun 28, 2016 12:53 pm
First Name: James
Last Name: Sherwood
Company Name: Brunswick Boat Group
City: Knoxville
State / Province: Tennessee
Contact:

Invoke Windows App via Image Click

Post by James-S »

We are developing an application where upon an image click we can open in a new tab in the browser to point to the same image (.jpg) on an HTTP server. It is being requested that clicking the image would link to a drawing (.dwg) file of the same image but invoke an application associated with the .dwg file type.

I am just learning JavaScript so curious if anyone knows how to do that after a click image in Profound?

Any help appreciated.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Invoke Windows App via Image Click

Post by Scott Klement »

What are you asking how to do?
James-S
Profound User
Posts: 61
Joined: Tue Jun 28, 2016 12:53 pm
First Name: James
Last Name: Sherwood
Company Name: Brunswick Boat Group
City: Knoxville
State / Province: Tennessee
Contact:

Re: Invoke Windows App via Image Click

Post by James-S »

Scott,

My apologies for not being clear. I will try to better explain.

The request is to have an image type widget on a screen (e.g. jpg). On the click event on that widget, to have it go out to a HTTP server and select a file of .dwg. The .dwg file opens within an associated Windows program (TrueView to be specific). I guess in what I can explain, something like what happens when you download a file in Windows and if it has an associated file type to a program, it opens in the program.

Hope that further explains what the goal is.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Invoke Windows App via Image Click

Post by Scott Klement »

So, it sounds like on the onclick event, you want to do:

Code: Select all

window.open("http://the-url-to-the-dwg-file");
as well as configure the browser to open the file correctly (if it doesn't already do that.)
James-S
Profound User
Posts: 61
Joined: Tue Jun 28, 2016 12:53 pm
First Name: James
Last Name: Sherwood
Company Name: Brunswick Boat Group
City: Knoxville
State / Province: Tennessee
Contact:

Re: Invoke Windows App via Image Click

Post by James-S »

Yes, I think we are in sync.

So, I am using the window.open() function and it is opening up the .jpg in a new tab. If I understand what you are saying, if using the .dwg in the window.open() and the browser has been configured to associate to the TrueView program, that would open the application and not another browser tab?

Did I state that correctly? Please pardon my ignorance on JavaScript and browser interactions. I am slowly learning this from as an OLD IBM green screen developer. :)
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Invoke Windows App via Image Click

Post by Scott Klement »

Its hard to say exactly, since I don't have any prior experience with .dwg files.

But, typically, if you try to open a file type that the browser doesn't itself know how to handle, it will fall back on the configuration for the various plugins or file type actions. If it still doesn't find anything, it'll just download it.

Part of this also depends on the HTTP server to give the proper media type for the file its downloading.

Anyway, it's really easy to try this and see what happens.
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests