cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

How to overlay hyperlink widget on button in thingworx studio?

dsengupta
1-Newbie

How to overlay hyperlink widget on button in thingworx studio?

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?

ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

3 REPLIES 3

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.

katte
1-Newbie
(To:nkhose)

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.

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

Announcements

Top Tags