Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alternative to Javascript prompt box for younger users

Can anyone can suggest an alternative to Javascript prompt box that is better for young users?

prompt("Please enter your name:", "Harry Potter");

Check it out.

Since the input box needs to be designed for children, I want the prompt box to be more colorful and lively. Any suggested existing box that I can use?
The requirement is that I have to let the user enter a string, receiving it.

like image 764
Alston Avatar asked Aug 10 '12 16:08

Alston


People also ask

What can I use instead of prompt in JavaScript?

The standard prompt() modal dialog can be replaced using DayPilot. Modal. prompt() method.

Why is prompt () Used in JavaScript?

The prompt() method is used to display a dialog box with an optional message prompting the user to input some text. It is often used if the user wants to input a value before entering a page. It returns a string containing the text entered by the user, or null.

What are the two argument of prompt dialogue box in JavaScript?

Prompt Dialog Box This dialog box is displayed using a method called prompt() which takes two parameters: (i) a label which you want to display in the text box and (ii) a default string to display in the text box.


1 Answers

Have you tried out BootBox?

Bootbox.js is a small JavaScript library which allows you to create programmatic dialog boxes using Twitter’s Bootstrap modals, without having to worry about creating, managing or removing any of the required DOM elements or JS event handlers.

It has a very neat alternative to the default JavaScript Prompt box.

like image 129
Vishnu Avatar answered Sep 28 '22 07:09

Vishnu