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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

How to close the mashup on button click

Janakiraman
10-Marble

How to close the mashup on button click

Existing Answer in the forum:

Add an expression widget, and set it on Expression=close(); 

Then you just need to trigger that expression widget whenever you want to close the browser window.

By, CarlesColl,

 

 

 

 

I tried the above solution to close the current tab by a button click, It is working fine when it is triggered from the parent window(E.g: triggered from view mashup option) But not working when I copy the URL put into the new window.

 

 

Kindly provide the solution for this ASAP.

 

Thank You

 Regards,

Janakiraman P

1 ACCEPTED SOLUTION

Accepted Solutions

If you look on the browser developer tools console you will see the reason why:

Screenshot 2019-01-08 09.12.54.png

I think you are out of look on that situation... there's an interesting read about it on Stackoverflow: https://stackoverflow.com/questions/19761241/window-close-and-self-close-do-not-close-the-window-in-chrome

View solution in original post

4 REPLIES 4

Hi,

I don't understand what does you mean with saying copying the URL and putting into a new window, if the URL it's the same as the original should also work, or I don't understand the context...

 

Carles.

Hi Carles,

 

I meant to the mashup URL. To explain the same, I used academic edition.

Please find the following attachments explains what I tried to.

img1.pngimg2.pngimg3.png

 

Use the following URL for your ref,

 

https://ptcu-thingworx74-fundamentals.portal.ptc.io/Thingworx/Runtime/index.html#mashup=CloseOnClick_Janakiraman&__fromBuilder=be405166-291a-4670-b672-05678efc4395

 

id: Janakiraman

pwd: janakiramanjohn

If you look on the browser developer tools console you will see the reason why:

Screenshot 2019-01-08 09.12.54.png

I think you are out of look on that situation... there's an interesting read about it on Stackoverflow: https://stackoverflow.com/questions/19761241/window-close-and-self-close-do-not-close-the-window-in-chrome

Hi,

Do we have any other option to close the current tab or complete browser?

I need it.

 

 

Regards,

Janakiraman P

Top Tags