I am using HTML5 on an iPad application.
Is there anything like an alert box that I can use to show a message? I know HTML5 has a dialog box but if there is an alert box that would be better.
You can use the good old-fashioned JavaScript alerts:
alert("Hey! Pay attention!")
See here: http://www.w3schools.com/jsref/met_win_alert.asp
Related
I just wanted to know if blockUI provide any support for differently-abled / blind users ?
For example, when loading spinner is visible on screen, an announcement should be made for screen reader users eg. 'alert loading content' or something similar.
Please let me if same is already implemented or not?
<span aria-live="assertive" id="" class="sr-only" role="alert" style="display:none;">something is loading</span>
this span should be shown if loading spinner is visible
Just using a demo, the plugin is not completely accessible. It would require extra work since the modal dialog does not properly handle all keyboard interaction at all. A user should be able to close the dialog with the Escape key. As well, clicking on the 'shade' area should close the dialog, and there's no close button for the pop-up. The user is forced into a choice.
Speaking to the animation specifically, I would suggest following the guidelines for timed media specific to video-only since there's an animation, and provide a clear explanation of the loader, but I would avoid using this method if at all possible. There are much clearer and cleaner methods for modals that are WCAG Compliant and still actively supported.
Time-Based Media: https://www.w3.org/TR/WCAG21/#time-based-media
Does anyone know if the GCM native notification prompt you see on Browsers such as Chrome, can be replaced or adjusted in any way so that we show a more presentable popup instead?
Here is a native prompt example:
No, you cannot customize it.
The only option would be do draw your custom dialog with HTML / CSS, then when someone clicks subscribe display the default browser dialog: I've already seen it on some websites, but I strongly recommend against it (because of the bad UX it provides).
How can I create popup like in Ghostery and is it possible to have some HTML content in it?
Ghostery's purple bubble
The best way to implement a notification popup for a Chrome app or extension is to use the chrome.notifications API. You can choose to enrich the notification with a text or even an image, but HTML content is not supported. Find the complete documentation here: https://developer.chrome.com/apps/notifications
I want to customize the default look of alert boxes which generally shows in any browser. Is there any way to customize according to my choice?
I found this link.
Actually i want to customize alert boxes so that i can use it using PHONEGAP
No, you can't style alert boxes. If you want to style popups use modal windows.
Could someone please tell me how can I change the default css of a alert/prompt box ?
You can't. They are native to the browser and are not styl-able.
You should turn to javascript alert-like systems. Using jQuery, here are some:
jAlert
jQuery UI dialog (with some tweaking)
This page proposes three alternatives to native alert/confirm/prompt
This answer shows a way to have a confirm-like blocking dialog using jquery ui dialog
The alert box is built into the Browser. You will need to popup your own dialog. The jQueryUI is very good for this.
For an example on this, look on the jQuery UI site.
As noted above you may always use the jQuery Alert box...
But you may also fire a JavaScript/jQuery Function in which displays a DIV (HTML Element), in which you may style completely.
The alert box that is used by javaScript is part of the browser. (other poeple have pointed this out but if you would like to have a good starting point try this.
http://jqueryui.com/demos/dialog/#default
jQuery Ui has some great tools for creating your own alert box and will also having other helpful options.
Just wanted to give some more information.