I am showing alert on this. But alert is clipped on the either sides, width of popup is 320px. How can I display the entire alert ?Pop-up screen
Asked
Active
Viewed 2,747 times
-1
-
Possible duplicate of [Set width of javascript popup box](http://stackoverflow.com/questions/13924550/set-width-of-javascript-popup-box) – Jonas Grumann Aug 29 '16 at 10:05
-
1Please explain your question – Aamir Aug 29 '16 at 10:05
-
No it is not a duplicate. I am only use short String, like this alert("test'); – Łukasz Szydowski Aug 29 '16 at 10:11
2 Answers
1
In your screenshot the popup is cropped to the parent window size. Resize the window to show the full alert box.
In all browsers I know the alert-box is always a child of the browser window, so it can never reach outside the browser window.
Option 1
You could use JS to resize the browser window (e.g. make window wider before alert, smaller again after alert):
window.resizeTo( width, height );
Option 2
Create your own JS popup box instead of using alert(). You cannot style the alert() box, but you can control size/design of a custom popup you create

Philipp
- 10,240
- 8
- 59
- 71
-
In another version of browsers, Alert has a changeable width. – Łukasz Szydowski Aug 30 '16 at 10:47
1
That problem occurs when Chrome is running on Windows 7. It occurs when alert is smaller than 370px. I have the same problem and I found that it is a bug in Chrome when is used on Windows 7.

krolik1991
- 244
- 1
- 4
- 13
-
So you're right, I confirm that it works on Windows7 and Chrome. – Łukasz Szydowski Sep 15 '16 at 11:16
-
it's not specifically Windows7 though, I could reproduce it on OS X (Mac) as well... – Philipp Sep 28 '16 at 12:27
-