This project has moved and is read-only. For the latest updates, please go here.


tryShowDialog Gone?


We were using the tryShowDialog in the previous version of Alert.js in order to display custom Web Resource Html Pages as dialogs. I don't see a method to support it any more. Can you add it back, or potentially make a showWebResource() method that supports it?
Closed Oct 11, 2016 at 5:18 AM by Liger_cp <SND\Liger_cp>


Liger wrote Aug 19, 2016 at 1:47 PM

Hi, the tryShowDialog method is no longer needed in version 2.0 as the alerts are using custom divs now, rather than using the unsupported CRM lightbox. For this reason tryShowDialog was removed from the solution as it's pretty unsupported how it works anyway, and it was never really intended to be a publicly available function (even though it technically worked in other scenarios like yours).

I am actually in the process of creating a showWebResource function, and also a generic function to show an iframe, which basically will allow you to embed any page (web resource or other) into the light-box using the supported show and hide methods etc. There's no current release date planned for this, but it should be available in the coming months.

In the mean time, if you need the tryShowDialog method, I'd recommend copying the method from the v1.1 solution into the 2.0 solution (, so that you can get the best from both solutions. However keep in mind that tryShowDialog is pretty unsupported, which is why I'm dropping support for it in current and future versions.

Sorry for any inconvenience!

hulk2484 wrote Aug 19, 2016 at 2:09 PM

Awesome. If there is something I can do to help, let me know...

Liger wrote Oct 11, 2016 at 5:18 AM

Hi, version 2.1 is now available which includes some new functions for showing web resources, iframes, and dialog processes. Check out the documentation tab for instructions on how to use the new methods.

There's also some additional helpers for accessing the iframe window from inside CRM, and also accessing the CRM window from inside the iframe.

Would love to get some feedback from someone who's actually using it.


wrote Oct 11, 2016 at 5:18 AM

hulk2484 wrote Oct 12, 2016 at 3:17 AM

I'll see if I can find some time this week or next to try it out!

hulk2484 wrote Jan 23 at 10:07 PM

I finally got back to this. Looks works for me! I added the old function for showing Pages, to maintain backwards compatibility so I can gradually update everything to match the new API.