Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alert js is not working on HTML web resource #36

Closed
kyilintun2017 opened this issue Aug 16, 2021 · 3 comments
Closed

Alert js is not working on HTML web resource #36

kyilintun2017 opened this issue Aug 16, 2021 · 3 comments

Comments

@kyilintun2017
Copy link

kyilintun2017 commented Aug 16, 2021

Hi Paul,
I try to use alert.show and Dialog(option).showLoading() function in my html web resource Iframe in D365 CRM.
I can call the function from my html webresource. But the loading message doesn't appear.
I try to debug there's no error.

         alert.js version - 3.1.1

     Edit: the scripts were working fine on Ribbon workbench and CRM form.
@kyilintun2017
Copy link
Author

image

var _options = { id: "loading",
title: "Processing..." ,
buttons : [],
preventCancel : true,
width : 500,
height : 120,
baseUrl : parent.Xrm.Page.context.getClientUrl()
};
new Dialog(_options).showLoading();

the steps go smoothly but no error was given and also nothing shows up.

image

@PaulNieuwelaar
Copy link
Owner

Hey, when using it in web resources you should include a reference the to alert.css file, just like you're doing to reference the alert.js file.

You can also add a reference to the Xrm global context so you don't need to set the baseUrl.
https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/getglobalcontext-clientglobalcontext.js.aspx

@kyilintun2017
Copy link
Author

Hi Paul,
Its work I didn't aware about alert.css file thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants