Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Cuireadh an snáithe seo sa chartlann. Cuir ceist nua má tá cabhair uait.

Scrollbars in alert dialog box

more options

I have following HTML code which creates a dialog box when clicking the button.

On first click there is a horizontal scrollbar, however text is still readable, however if you click the button second time, the text is hidden under scrollbar.

How do you fix this?


<script type="text/javascript"> function clicker() { alert('SomeLongMessageWithoutSpacesInIt_SomeLongMessageWithoutSpacesInItSomeLongMessageWithoutSpacesInIt_SomeLongMessageWithoutSpacesInIt\n' + 'SomeLongMessageWithoutSpacesInIt_SomeLongMessageWithoutSpacesInItSomeLongMessageWithoutSpacesInIt_SomeLongMessageWithoutSpacesInIt\n' ) } </script> <input type="button" onclick="clicker()" value="click">

I have following HTML code which creates a dialog box when clicking the button. On first click there is a horizontal scrollbar, however text is still readable, however if you click the button second time, the text is hidden under scrollbar. How do you fix this? <html> <body> <script type="text/javascript"> function clicker() { alert('SomeLongMessageWithoutSpacesInIt_SomeLongMessageWithoutSpacesInItSomeLongMessageWithoutSpacesInIt_SomeLongMessageWithoutSpacesInIt\n' + 'SomeLongMessageWithoutSpacesInIt_SomeLongMessageWithoutSpacesInItSomeLongMessageWithoutSpacesInIt_SomeLongMessageWithoutSpacesInIt\n' ) } </script> <input type="button" onclick="clicker()" value="click" /> </body> </html>
Attached screenshots

Athraithe ag bobsort ar

All Replies (1)

more options

Oh, is that because of the checkbox Firefox adds allowing you to stop the site from showing repetitive alert dialogs? I don't know of a workaround for that, other than having more time in between dialogs so the checkbox doesn't appear.

I looked into the checkbox a long time ago and don't know whether it works the same way it did back then: http://forums.mozillazine.org/viewtopic.php?f=25&t=2172671 (different forum)