Home > Forum > Plugins > Client side plugins action

Client side plugins action
0

Hi, I would like to create an plugin that will open a link in the client side browser. I try using basic .NET method, but the browser starts on the server where Webcon is installing.
Would I have to make a separate addon running on the client side? Then how to install such an add-on?

MVP

Hi Tomek,

I fail to see why you want to start a browser from within a browser. :)

If the user can click on a link you can use the target attribute to define that the link should be opened in a new window.
https://www.w3schools.com/tags/att_a_target.asp

If you want to trigger this automatically you can use Javascript and window.open
https://developer.mozilla.org/en-US/docs/Web/API/Window/open


If you want to redirect the browser to a different location after path transition you can use the hyperlink action. Here's an example for executing arbitrary Javascript.
https://daniels-notes.de/posts/2022/add-new-choice-field-value-without-leaving-the-page
Using something like document.location.href = 'https://www.webcon.com' should allow you to redirect to any URL. Maybe there's an syntax/spelling error. I currently don't have access to a system where I can verify it.

But maybe I'm completely wrong and you w a NT to achieve something different. :)

Coming back to the original question:
Plugins with.net code are always executed on the server.
Form field extensions using Javascript are executed in the browser of the client.

Best regards,
Daniel

MVP
In reply to: Tomek

I'm still a webcon beginner so i don't really know how to do it.
In the addon code I assign a link to some attribute and then create build-in action which uses the link yes? How do you make such actions?

Yes, I was referring to the hyperlink action that Daniel mentioned. You have to play around a bit to know these basics :)
I would also recommend to have a look at the knowledge base, for example there is a detailed description of the hyperlink action https://howto.webcon.com/the-hyperlink-action/
Have fun :)

MVP
In reply to: Sebastian Gębuś

Yes, I was referring to the hyperlink action that Daniel mentioned. You have to play around a bit to know these basics :)
I would also recommend to have a look at the knowledge base, for example there is a detailed description of the hyperlink action https://howto.webcon.com/the-hyperlink-action/
Have fun :)

Hi Tomek,

you could also create a Business rule using the SDK. The rule could return the value for the hyperlink action.

Alternatively you could call the rule from a form rule.

Here you can find an example of a custom business rule:

https://github.com/Daniel-Krueger/webcon_cclsactions/tree/main/CCLSActions/GetUrlValue

Best regards,
Daniel