+ 2

javascript alert box

May i show alert box of js on specific position like in the middle for all browsers. when i tested the alert box in chrome ,firefox or opera ,these all browser show alert on different places.

19th Feb 2018, 1:14 AM
Bipul Kumar Singh
Bipul Kumar Singh - avatar
2 odpowiedzi
+ 2
For that, you will need a custom alert box not just a normal alert because regular alerts are displayed differently on different browsers. Try SweetAlert. https://sweetalert.js.org/guides/
19th Feb 2018, 1:59 AM
Jonathan Pizarra (JS Challenger)
Jonathan Pizarra (JS Challenger) - avatar
+ 2
i got the answer,we can not position the default dialog box of the browser.But we can design our own custom alert box using jquery or you can use 3rd party dialog box. Here are some substitute for the built-in dialogs of the browsers 1. https://github.com/fabien-d/alertify.js 2. http://labs.voronianski.com/jquery.avgrund.js/ 3. https://github.com/damirfoy/iCheck/ 4. http://blueimp.github.io/jQuery-File-Upload/ 5. https://github.com/danpalmer/jquery.complexify.js/
19th Feb 2018, 2:20 AM
Bipul Kumar Singh
Bipul Kumar Singh - avatar