Need help understanding local and remotely

Hi there

still very new to this and so probably being stupid but here goes.

Ive created a very basic dashboard. 2 columns both size 6.
ive used two cards both with an image
so far so good. I did a search a found a post on how to make a UDcard work with onclick…still good when running from where the dashboard is loaded.

I then run the dashbaord from my machine (so conneted via the address) dashboard loads, but when i click the card it opens the webaddress ive assign on the server the dash board is loaded on.

Ive tried invoke-udredirect and that works remotely but idaelly id linke a page to open in a new tab?

this then also got me to thinking how do i get the dashboard to open something (an app or webpage) on the users machine? i did try invoke-command which failed due to winrm not being started (expected) so im now kinda out of ideas well knowledge and think i must be doing something wrong and making life just harder than it needs to be

cheers

Perhaps you could share your dashboard.ps1 file so we can understand a bit better what you are doing with your code?

Hi @Egatimra

What you’re looking for is

Invoke-UDRedirect -Url "vg.no" -OpenInNewWindow 

Which would open the link in a new page. The -openinnewwindow just adds a “target=blank” to the html a target.
https://www.w3schools.com/tags/att_a_target.asp

Any non-UniversalDashboard module commands runs on the server, certain UD commands “runs” (it’s executed serverside, with some fancyness to force the client to do stuff with javascript) on the clientside. Trial and error bruv.

Check out @psDevUK’s github for a glorious example, and learn.


That or his blog:

1 Like

ohh thank you for this, i’ll get reading, and so how would i go about say opening an application for example notepad?

its just a default dashboard with a UDCard on it that when clicked will either take you to a website or open an app

Opening an app from a website (UD or otherwise) won’t work unless there is a custom protocol handler configured. Here’s some info on how to configure that on Windows: https://stackoverflow.com/questions/7087728/custom-protocol-handler-in-chrome

1 Like

ok so i cant have a script block that would tell it to open VNC for example by click on a button or Card?

Due to limitations with web browser:
No you cannot without a custom protocol handler.

Explorer folders can be linked if your users is using Internet Explorer and added the site to trusted sites though :slight_smile:

1 Like