When the application session times out, I display a dialog to the user saying "The session is about to timeout" and I display 2 buttons on the dialog "Signout" and "StayLoggedIn".
Along with this dialog, I display a desktop Notification to the user which warns the user about the session timing out.
When I click on the 'SignOut' or 'StayLoggedIn' button on the dialog, I need to close the notification too along with the dialog.
I am using Notification.close() to close the notification.
The Notification closes fine when I click on the dialog buttons when I just have one application tab open.
But if I have 2 application tabs open(eg - google.com,google.com) and click on the dialog buttons in one of the tabs, the notification.close() gets called but it does not close the notification.
Anyone came across similar issue? I am stuck. Need help please. FYI I am on Chrome version 78.
Every tab in chrome is a new process. Windows 10 is process isolated with toast.
The toast created in process A can not access a toast created in process B and vice versa.
Toast notifications usefulness came and gone with the focus assist feature. So honestly I would skip using them in any new app.
Related
I saw some websites open new tab on paypal button click. I'm trying to implement the same behaviour but cannot find the way how to do that. It always opens the pop-up on the same page.
Is there a way of doing it with JavaScript intagration.
The method I use https://developer.paypal.com/docs/checkout/#
If you go by the link above and click on paypal button (demo example) it will open a popup where you do your payment and then it closes. I want the same to happen in new tab instead of popup.
You would need to not integrate with the PayPal Checkout JS, and instead create your own button and write your own JS to open the Orders V2 API redirect_url in a new tab when your button is clicked.
There is no reason you should want to do this, however. The popup is in fact a better, modern "in context" experience that keeps your site open and loaded in the background. It is in fact more user-friendly in this respect. I remember from the days when this popup was first released, PayPal spent spent a lot of effort getting the experience right and making sure it performed better, i.e. resulted in more users going through with and completing the checkout, than going away to a new separate tab (that might be unfamiliar). You can trust PayPal on this, it's the company's bread and butter.
Currently I log in SAPGUI via Portal. I have ABAP program which opens a link to UI5 application (creating a new tab in the same browser window with the Portal).
There is a requirement that by closing the UI5 application tab, ideally the SAPGUI window will pop up and user should go back to SAP GUI to continue original transaction. Consider adding a footer to the UI5 app with a button to “Close” which will close the tab.
Is it possible to handle "going back to SAPGUI" from javascript?
no. Thanks good, that is impossible. Imagine if every webpage could access your desktop in any way.
You can use SAPGUI shortcuts to open a new transaction via file download.
Just set up every browser as open download per default and trigger a SAPGUI shortcut via button.
I am implementing a pop up based notification system where logged in user will receive a pop up on the website. But the problem here is when user is not on the browser and working on some other tools like excel, in that case he/she will not able to take action based on that pop up. Is there any way to focus on that window which has received new pop up.
Thanks in advance.
When a user which is not logged in to Facebook or Twitter, clicks the like/tweet button, a popup comes up asking the user to log in. This popup is not blocked by popup blockers of any kind. in IE for example, it opens up but anyway IE state a warning to the user. The bottom line is that all buttons probably use the same method.
I have a button that people click on it and it should open a similar screen, but it always gets blocked.
The button (in JS) works pretty much like FB like button. It checks if the user is logged in. If he does, then send the "like" to the servers. If he does not, then the login popup appears (and gets blocked).
So, it is a initiated by a user although not fully direct outcome, since we need to check if he logged in or not.
What is best method to do that?
The Popup Is activated by a click using the like, tweet button and they actually show only 1 popup. If you want, you can try by using only a single popup based on click for your website and you will definitely be able to understand this.
I'm writting a real-time chat application.
And I want to keep only one tab in the browser(chrome)
(firefox seems to act like that).
I've tried using cookie..
below is the js code using jquery.cookie.js
if($.cookie("online")){
window.close();
}else{
$.cookie("online",1);
}
But I did't get what I want.After refreshing the page will terminate the tab anyway.
and the cookie will stay alive until the browser is closed but not the tab.
Can anybody help me?
You cannot programaticaly close the current tab unless you opened it with Javascript.
This would also be very confusing for visitors, as they would get no information as to what happened, the window would simply close on them when they tried to open it.
Instead, consider displaying an error message or splash page telling them why they are not getting a second copy of the chat room, and telling them to return to the previous window. This would be much more user friendly.