Is there a way to set the height of alert
to display really long messages with enabling scrolling option for messages that extends screen height ?
Help would be appreciated , all plugins are not recommended.
You can't control a JavaScript alert
box in anyway.
Modern web development uses a modal dialog box to show this type of information.
jQuery UI dialog()
is one such popular option. See here: http://jqueryui.com/dialog/
alert()
only takes a message and cannot be configured in any way.
I know of no browsers that implement scrolling in the resulting dialog box. Firefox and IE just pop up a modal Windows MessageBox
in the OS theme's default dialog font, where Chrome has a little piece of toast that pops up towards the top of the browser window.
You would have to use a floating div
to make a sort of fake "dialog box" with the features you want. For example, jQuery dialog, or the excellent alertify.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With