I am using window.open('"+EncodeJavaScript(Url)+"') to open an external URl in new tab. it wont open if popup blocker is blocked on a browser which is expected. but Is there a way to identify if popup blocker is blocked so I can notify user proactively?
Hi Chetan,
Do you really need to use a pop up?You may try to use a link with the target attribute set to _blank, this way your link will open in a new tab, and you will not have any issues with pop ups.
Learn more about the target attribute here.
thanks for reply Raphael.
I have a master -> detail page structure. In detail page after updating information, user clicks on save button. On save button event, I have a Confirmation popup which ask users if they would like to goto External site If user opted to Goto External URL then it opens in new tab and data on existing tabs get saved and external tab gets redirected to Master page. So there is some logic involved before i goto external url.
What you can do then, is to create a hidden link.
This way you will redirect in a link, see in the attached module, I did a sample for you.
If you click Yes in this pop up:
A new tab will open (in this case I used google):
I achieved this, using a hidden link with a target attribute as "_blank":
After clicking in the Yes button on pop up, I click this hidden button:
Also, you can do whatever you want after that...And I'm almost sure it will not block your navigation.
This would work for you?
Cheers and Regards,
RR :)
I am not able to publish you module due to following error. But it seems reactive. Do you think same logic is going to work for traditional?
Sorry, I though you was using Reactive.But yes! Same logic can be applied!Give me a sec I will make a Traditional Sample for you.
Here you go!
Thank you so much for your help. I will give it a try.
you can try adding below javascript solution to check if the popups are blocked or not -
https://stackoverflow.com/questions/2914/how-can-i-detect-if-a-browser-is-blocking-a-popup
depending on the response you can proceed further.
Thanks,
Unnati K