Fujio Posted April 13, 2021 Share Posted April 13, 2021 In Mobile Application, use UniSession.BrowserWindow(AUrl,0,0,'new'); In the case of Chrome on PC, it will open a new window instead of a new tab. In the case of Safari on iPad, if I have pop-up blocking turned on, it will not respond at all. For example, if the caption of TUnimLabel is set to UnimLabel1.Caption:='<a href=/a.pdf target=new>a.pdf</a>'; and click on the link at runtime, a new tab will open and display correctly in both Chrome on the PC and Safari on the iPad. Is it possible to achieve the latter result with UniSession.BrowserWindow? Even if it's not UniSession.BrowserWindow, it's good if the OnClick event of the button gives the same result as when the link is clicked. Link to comment Share on other sites More sharing options...
Fujio Posted April 14, 2021 Author Share Posted April 14, 2021 After some trial and error, I found that Self.JSInterface.JSCode('window.open('''+AUrl+''');'); It seems to have worked. Thank you very much. Link to comment Share on other sites More sharing options...
Fujio Posted April 14, 2021 Author Share Posted April 14, 2021 Self.JSInterface.JSCode('window.open('''+AUrl+''');'); In this way, I have to turn off the pop-up blocker in Safari on my iPad. Do you guys have any other good ideas? Link to comment Share on other sites More sharing options...
Fred Montier Posted April 17, 2021 Share Posted April 17, 2021 Because it work very similar to how pop-up adds works. And it is the best way porn sites use to promote syndication since other tricks won't work. How do I know ? I've made some scripts to do exactly that. And that's the pop-up add blocker primary function. It's worst over the same tab with all the other " js-vanilla tricks". If you find any other way that avoid blockers (and ABP in all browsers)... let me know ! I'm very interested on that too. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now