0

I wonder if there is a way to create some checkboxes into a dialog (such as confirm or alert) with no intervention of HTML code, I mean, create a dialog with YES and NO buttons and checkboxes only with Javascript, which appears clicking a link.

Thanks.

Example: https://i.sstatic.net/7VnOW.png

EDIT

The result would show:

  • a dialog with buttons (OK, CANCEL), and various checkboxes
  • user cannot select more than 5 checkboxes, but at least one
  • once user select options and click OK, will send text strings corresponding to checkboxes selected. Example: "check1|check4|check7".
2
  • you cannot have checkbox in browser alert box.. though you can use popop like jquery dialog ....search for it Commented Dec 6, 2013 at 15:59
  • I already searched in google, but with no good results Where do I must to search? Commented Dec 6, 2013 at 16:00

1 Answer 1

0

You can achieve this by using an external library such as Jquery UI or even Twitter Bootstrap. You can create a modal dialog and embed every input type you want in it. Take a look to the JQuery UI docs, it might help. http://jqueryui.com/dialog/

Sign up to request clarification or add additional context in comments.

1 Comment

It could be possible if you generate the HTML markup from JavaScript. Take a look at this stackoverflow.com/questions/7286456/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.