CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

NewWindow and popup blocked

Questions & Answers about IWCGJQuery Suite.

by scoluccia » 01 Feb 2016 15:35

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
scoluccia
 
Posts: 61
Joined: 11 Mar 2015 15:10

by Alexander Bulei » 01 Feb 2016 18:59

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.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by scoluccia » 01 Feb 2016 20:26

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
scoluccia
 
Posts: 61
Joined: 11 Mar 2015 15:10

by scoluccia » 02 Feb 2016 14:35

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>';
scoluccia
 
Posts: 61
Joined: 11 Mar 2015 15:10

by Alexander Bulei » 02 Feb 2016 16:15

Hi scoluccia,

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

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal


Return to Q & A

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.