Skip to main content
1-Visitor
January 12, 2017
Solved

How to overlay hyperlink widget on button in thingworx studio?

  • January 12, 2017
  • 2 replies
  • 4212 views

I am developing my own thingwork experience. I have to make two buttons, which when clicked will lead to some web page. I am able to do that using hyperlink widget. But I need to make that as buttons.How can I achieve that?

Best answer by katte

Dipika,

That is an expected behavior. Button widget can't be used for redirecting to a webpage, it is recommended to use hyperlink widget.

Button widget is restricted to trigger a service, however you can write to JS code/function for Button widget, click on JS area (next to Click property) where you can write the function that needs to be triggered. The function script can be written home.js area.

In the othercase, on button click you can execute a TWX service that inturn makes a request to the webpage. I din't actually try this, but may be worth a try.

Thanks,
Giri

2 replies

1-Visitor
January 12, 2017

You may have two buttons widget  and two navigation widget ... bind the click event of both buttons to navigate  of navigation widget each.

Also as you say web page redirect and not mashups you may need to include iframe on both 2 navigation widget mashups to have source url as your web page

that you need to redirect.

5-Regular Member
January 12, 2017

Nilesh, Appreciate your reply, if I'm not wrong, you must be answering in the context of ThingWorx Platform. But the Question is about ThingWorx Studio, which is an AR product.

katte5-Regular MemberAnswer
5-Regular Member
January 12, 2017

Dipika,

That is an expected behavior. Button widget can't be used for redirecting to a webpage, it is recommended to use hyperlink widget.

Button widget is restricted to trigger a service, however you can write to JS code/function for Button widget, click on JS area (next to Click property) where you can write the function that needs to be triggered. The function script can be written home.js area.

In the othercase, on button click you can execute a TWX service that inturn makes a request to the webpage. I din't actually try this, but may be worth a try.

Thanks,
Giri