Comments (3)
Hi Sven,
Unfortunately we currently don't support disabling the alert buttons. As you mentioned it's technically possible with something like this: Alert.$("button:contains('OK')").prop("disabled", true)
but there's no guarantee that the buttons will still be buttons in the future etc, so do this at your own risk.
The way we usually recommend adding validation is to keep the buttons clickable, but add the validation on click. If some input on the popup is invalid then you can display the error message to the user and prevent the button action. Note that you can use the preventClose property on the button object to keep the alert open so you can run validation, then manually close it with Alert.hide();
when the validation is successful.
You may also want to consider upgrading to v3.0 as the support for Alert.$ and nested alerts are only in 3.0.
Cheers,
Paul
from alertjs.
Hi Paul,
Thanks for the quick Response.
At the Moment we have fixed it by keeping the custom Buttons (with Code) in the HTML itself and not defining them in the constructor. Afterwards we then close the Dialog ourselves.
I only made this Issue, due to that it actually feels like this is a missing feature in the great product you provide and which could Maybe eaily be implemented in the button constructor?
Anyway, I thank you once more for the quick Response and the great product you provide.
Regards,
Sven
from alertjs.
Hi Sven,
Appreciate the feedback, we'll definitely consider d this as a feature in the future, as I agree that it could be useful in certain scenarios such as yours.
Thanks again,
Paul Nieuwelaar
from alertjs.
Related Issues (20)
- Popup dialog box useing Alert.js and ribbon workbench HOT 4
- Pass value to Callback function from HTML HOT 3
- question before buying the third version HOT 4
- Alert.showWebResource -404 ERROR HOT 1
- Buttons not working HOT 1
- Unable to call a function inside a webresource from OK button HOT 1
- Use alert.showwebresource to get message from user HOT 9
- Supportability for Unified Interfaace HOT 1
- Alert.showWebResource fail in CRM build 1710 HOT 5
- Alert.getCrmWindow() is not working HOT 6
- Alert.showWebResource custom button closing alert HOT 4
- Dynamics CRM 365 (v9) compatibility HOT 7
- Issue with populating lookups in the new Dynamics 365 UCI (Unified Client Interface) HOT 5
- Issue using input fields on UI on Android devices in "portrait mode" HOT 1
- Xrm.Page / formContext HOT 1
- Theme colors HOT 2
- Change font-size issue HOT 2
- TypeScript "Cannot find module" errors HOT 4
- Alert js is not working on HTML web resource HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alertjs.