Page 1 of 1

NewWindow and popup blocked

PostPosted: 01 Feb 2016 15:35
by scoluccia
Hi
in my project I have a button it calls a WebAppication.NewWindow with a link of a img file, but if the browser has the popup disabled this button doesn't work, I'd like to insert an href on the onclick event but I don't know where write this code on the TIWCGJQButton.
or there is another trick

Thanks in advance

Re: NewWindow and popup blocked

PostPosted: 01 Feb 2016 18:59
by Alexander Bulei
Hi scoluccia,

I'd like to insert an href on the onclick event


What do you mean?
I guess, you want to use the anchor html tag with href.
If so, use our IWCGJQLabelEx and Link property.

Best Regards.

Re: NewWindow and popup blocked

PostPosted: 01 Feb 2016 20:26
by scoluccia
Alexander Bulei wrote:Hi scoluccia,

I'd like to insert an href on the onclick event


What do you mean?
I guess, you want to use the anchor html tag with href.
If so, use our IWCGJQLabelEx and Link property.


Yes the anchor html tag, I have used your demo upload file and instead of use NewWindow() I put a IWCGJQLabelEx on the frame with the complete url to the file in the Link property but it doesn't open a new tab

Can I do the same thing with onclick button like this <a href="wwwroot/upload/myimage.png" target="_blank">preview file </a>
in this way should pass the popup block

Re: NewWindow and popup blocked

PostPosted: 02 Feb 2016 14:35
by scoluccia
I've found this solution, it works fine, it opens a new tab and show the file also if the popup are bloked

IWbtnViewFile.caption := '<a href="javascript:" onclick="window.open('''+sLink+''');" target="_blank"></a>';

Re: NewWindow and popup blocked

PostPosted: 02 Feb 2016 16:15
by Alexander Bulei
Hi scoluccia,

Anyway, we have added the LinkTarget property in next beta build.
Thanks.

Best Regards.