Questions tagged as 'alert'

1
answer

Why does 'window.alert ()' work in the navigation between tabs and the 'window.focus ()' does not?

I have the following method: (function(){ window.addEventListener('blur', openChat); window.addEventListener('pagehide', openChat); })(); function openChat(){ setTimeout(function(){ alert('Há uma mensagem nova!...
asked by 12.04.2016 / 00:24
4
answers

Multiples Bootstrap Alerts

I'm trying to create a default response using alerts do bootstrap my goal with a simple: $(".alert").addClass('alert-success').text('Configurações salvas com sucesso.'); I choose the class alert-success and enter a text i...
asked by 14.07.2015 / 21:15
1
answer

How to call an alert, a notification for user in Android application?

When the user clicks on an option, he can receive an Alert saying, did you select a certain command, a certain option, how to make an alert of this type in an Android application?     
asked by 15.05.2016 / 19:28
2
answers

Customize an Alert [duplicate]

I have a code that when clicking the button it opens a new tab. Depending on the condition of the report it shows a Alert that by clicking Ok it closes the tab that was opened. Is there any way I can customize this alert, to be more...
asked by 29.10.2015 / 12:39
4
answers

___ ___ erkimt Show error message when entering phone ______ qstntxt ___

I have a form and I need this field

%pre%

In case it is the phone, it will display the following error messages: If the user types less than 8 digits, an error message appears, a %code% .

If the user types "-" which is an invalid character, an alert with = %code%

And if the number is valid (8 digits) nothing appears.

My code:

%pre%

It's not working.

The reference in the HTML to the javascript has to be by onKeyup if possible, as the javascript has to check after the user types.

Sincerely,

Gabriel

    
______ azszpr127718 ___

I suggest using the validation supported by the browser itself. This only works if the browser supports HTML5

%pre%

To use something more complete or different you can continue to use the onchange event with this automatic validation:

%pre%
    
______ azszpr127721 ___

You can do this:

%pre% %pre%

Remembering that it is more practical to limit size by html using maxLength, and using onblur prevents it from showing the message at all times when typing.

    
______ azszpr127729 ___

To complement, I'll leave a more complete version of @GabrielRodrigues' answer.

I made using the jQuery Mask Plugin , I believe it increases the usability of the field since it already comes formatted, in addition it it also "prohibits" any letters or any non-digit characters from being typed.

%pre% %pre%
    
______ azszpr127738 ___

I got it! I used the answer from @Bruno Costa and Js from @Gabriel Rodrigues. It just looks like this:

%pre%     
___

I have a form and I need this field <label class="labVal210Esq">Telefone: <input type="text" class="val120Dir" name="TxtTelefone" /> </label> In case it is the phone, it will display the following error messages: If the us...
asked by 10.05.2016 / 15:07
1
answer

How to do when clicking on the ok of the alert, only then go to another page?

Well, guys, I'm learning ionic now in college, and I wonder if it's possible, in an alert, to make it only after the user clicks 'ok', in my case 'change', it goes to a certain page? Thank you for your attention. Code: presentConfirm() { let...
asked by 11.11.2017 / 22:56
1
answer

How do I return the sum total of the words repeated, within all div?

To illustrate the degree of difficulty, I put 3 div and within them identical words, put it on purpose to add to its duplication. <div> <div> <div> Diego Ademir Diego Maicon Diego...
asked by 23.03.2017 / 18:29
2
answers

Message when the user is exiting the application

I know I can use AlertDialog for this, but without creating a button, only when the user is pressing the back to exit does an alert appear? Type, when it comes out (this involves the Android system in the part that does it alone) would a...
asked by 24.12.2015 / 00:48
2
answers

E-mail alert - TFS Visual Studio

I would like to know if there is any possibility of configuring TFS alerts, according to the branch that was changed. I do not have any objects in lock with me, but I need to track check in of certain branches that many people change. For exa...
asked by 22.01.2016 / 12:13
3
answers

Customize the alert

I need help with alert() of js , in which I'm returning some values just information for the user. Today I'm only returning alert() , however I've been searching and found some alternatives (modal, bootbox, etc ...), but I...
asked by 09.01.2018 / 16:13