skafinski Posted March 20, 2024 Posted March 20, 2024 Hi, I'm trying to open new tab (blank) with href to some location on disc. If i use label and use a href it works and opens new tab no problem. If i use button and set hreftarget to _blank and href for path it doesn't work object UniButton1: TUniButton Left = 608 Top = 45 Width = 75 Height = 25 Hint = '' Caption = 'UniButton1' TabOrder = 11 Href = 'file:///D:/somefolder' HrefTarget = '_blank' OnClick = UniButton1Click end also if i use niSession.AddJS('window.open(''file:///D:/somefolder', ''_blank'');'); it doesn't work. Does anybody knows how to do this? Quote
Sherzod Posted March 20, 2024 Posted March 20, 2024 Hello, First of all please specify which edition and build of uniGUI are you using? Quote
skafinski Posted March 20, 2024 Author Posted March 20, 2024 Using professional edition 1.95.0.1580 1 Quote
Sherzod Posted March 20, 2024 Posted March 20, 2024 3 hours ago, skafinski said: If i use label and use a href it works and opens new tab no problem. How? In most modern browsers, opening a local file using a link (href) is not possible for security reasons. This limitation is due to security policy. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.