DMXzone Security Provider PHP Support Product Page

Answered

(App) how remove index.html from dialog alert notification

Asked 14 Feb 2018 22:10:12
1
has this question
14 Feb 2018 22:10:12 Michele - posted:
Hello,
I've an app with a login process and when the user enters wrong username/password, see this alert notification:


How can I remove the "index.html"?

This is the code that generate the dialog:
dmx-on:error="browser1.alert('Please enter valid login details!')"


The app use the plugin "cordova-plugin-dialogs":
cordova.apache.org/docs/en/latest/reference/cordova-plugin-dialogs/index.html

Thanks.

Replies

This reply was removed on 2/15/2018 7:30:07 AM.
See the changelog
Replied 15 Feb 2018 07:30:37
15 Feb 2018 07:30:37 Michele - replied:
Alternatively, if it is possible to use something else to display error/action messages in the app, without calling the dialog windows.
Replied 15 Feb 2018 08:26:57
15 Feb 2018 08:26:57 Teodor Kuduschiev replied:
Hi Michele,
Unfortunately this is not something we have control of. It is how the native alerts are handled by browsers.
You can for example show/hide styled divs on the page instead of using alert messages.
Replied 15 Feb 2018 08:52:47
15 Feb 2018 08:52:47 Michele - replied:
Hi Teodor,
could you show me (or tutorial/video if available)...
... how to change the check username/password for a form:

<form action="https://url/dmxConnect/api/Security/Login.php" method="post" id="formlogin" role="form" is="dmx-serverconnect-form" dmx-on:success="browser1.goto('index.html')" dmx-on:error="browser1.alert('Please enter valid login details!')" site="...">


with "show/hide styled divs"?

Thanks!
Replied 15 Feb 2018 09:15:08
15 Feb 2018 09:15:08 Teodor Kuduschiev replied:
Just use the show/hide dynamic attribute:


Quote<div dmx-show="formlogin.lastError.response == 'Unauthorized'">Please enter valid login details!</div>


Replied 15 Feb 2018 11:25:00
15 Feb 2018 11:25:00 Michele - replied:
Ok, thanks Teodor.

Do you know if is possibile (and how) to set the dialog popup for the login check with that of Framework7?
framework7.io/docs/dialog.html
Replied 15 Feb 2018 11:32:48
15 Feb 2018 11:32:48 Teodor Kuduschiev replied:
Hi Michele,
You can call js functions on static events. Select the form -> Static Events -> On Error -> Call the javascript function you need to open the dialog.
Replied 15 Feb 2018 22:00:36
15 Feb 2018 22:00:36 Michele - replied:
Excellent, now I've the dialog with the correct settings.
Thanks and good luck for the crowdfunding of Wappler!

Reply to this topic