Hello,
I need to launch new window/tab on my flask website, which will be in separate thread and do its own job, with the ability to close/stop that thread/browser tab from the main page/thread.
Could someone give me an example how to achieve this?
I am running flask website using apache's wsgi.
Thanks
I don't understand what you're asking. What makes you think you have any control over how the browser uses threads?
In any case, if you just want to open a new window, obviously that's done client-side. As such, you'll need to find the appropriate JavaScript (or whatever you're writing on the frontend) function to do it.
(Sep-15-2021, 06:41 AM)Notabene Wrote: [ -> ]Hello,
I need to launch new window/tab on my flask website, which will be in separate thread and do its own job, with the ability to close/stop that thread/browser tab from the main page/thread.
Could someone give me an example how to achieve this?
I am running flask website using apache's wsgi.
Do you mean
Flask? It executes in a server, correct? Browser windows execute in the client, right? Usually a different computer; the country might even be different.
If you want a link to open in a new page then you need to change the HTML in your Flask function.
<a href = "">Normal Link </a>
<a href = "" target="_blank">This will open the link on a new tab</a>