Skip to content
Advertisement

Tag: prompt

Alert windows for second function not popping up

I’m working on an assignment where I have to write a basic program that generates a random password based on certain criteria. I have written the following snippet of code to receive input from the user regarding the minimum and maximum values of the desired password length. ` ` The prompts in the getPassMin() method all work as expected, however

Loop prompt when input isn’t a month

I’m trying to loop the prompt when the user enters incorrect input. I googled and clicked almost all the top links, tried while loop and for loop and am just not getting anywhere. When I use the method i found of a loop, my button is no longer clickable or it clicks but when I input invalid month, no alert

SweetAlert prompt with two input fields

Currently working on a personal project. I want the user to click a button and a SweetAlert prompt would be presented for the user to verify their credential. However, the code I see on the SweetAlert website only allows one input field. Here is the code I have: So, is there a way I can get two input fields? One

Detect empty value on prompt

How to detect an empty value when user presses ok on prompt (and previously empties the prompt field)? I need to overwrite the old value with the new (empty) value. I’m doing this: Currently it returns null if user empties value and clicks ok. But at the same time I need to check for null value because if user clicks

Advertisement