on 05-30-2013 11:27 AM
Hi everyone,
when calling the function
hwc.showAlertDialog("message", "title");
in the file custom.js a popup shows up as expected, containing the message. But there is an error displaying the title and I have no clue why. You can see it in the attachment of this post.
API.js contains the following:
/**
* @deprecated since version 2.2 - should now use hwc.showAlertDialog(...)
*/
function showAlertDialog (message, title)
{
return hwc.showAlertDialog (message, title);
}
Is this a bug ?
Greetings
Alex
This is going to be a long, and possibly, boring story, but here it goes. On iOS, and iOS only, the dialog that the embedded browser control brings up for a Javascript alert() uses the html file as the title (for reasons I'm not personally fond of), this isn't configurable. In older versions of SUP, we had a customized API, showAlertDialog(), that would bring up a native dialog on iOS, with a customizable title, and the regular alert on the other platforms where the title wasn't an issue. Unfortunately, for various technical reasons, primarily multithreading, that solution caused more problems than it was worth, so we have reverted to the browser control-supplied alert() dialog on iOS.
In practice, I would not recommend using an alert() in situations where the user is likely to see it. I would recommend using a Dialog or a Popup instead, you can get a much better look-and-feel, using the appropriate jQueryMobile theme, that way.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The title you are getting is a default title. It is not an error.
I am not sure whether it is possible to change the title of the alert in SUP 2.2.
Once I used confirm API in SUP 213 where similar title was coming. It is not possible to change that. Hence I used the alert of Phonegap. ex: navigator.notification.confirm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.