Click to See Complete Forum and Search --> : Alert box help


mabbutt
07-10-2003, 12:22 PM
Hi

I would like to put a line break in my sentence but I just can't seem to get it to work.

I have displayed the code below.

I want to put a line break in after "correctheight"

<script language="JavaScript1.2">
<!--

var correctwidth=800
var correctheight=600
if (screen.width!=correctwidth||screen.height!=correctheight)
alert("Never Walk Alone is best viewed with a screen resolution of "+correctwidth+" by "+correctheight+". Your current resolution is "+screen.width+" by "+screen.height+". For best results, please change the resolution.")
//-->
</script>

Any help would be greatly appreciated !!! :D

Charles
07-10-2003, 12:37 PM
alert('It is the inferior web author that \nis either too ignorant or too lazy to \nmake a page that works on all \nbrowsers and all screen resolutions.')

jtol
07-10-2003, 12:39 PM
try this...

----------------------------


<script language="JavaScript1.2">
<!--

var correctwidth=800
var correctheight=600
if (screen.width!=correctwidth||screen.height!=correctheight)
alert("Never Walk Alone is best viewed with a screen resolution of "+correctwidth+" by "+correctheight+". Your current resolution is "+screen.width+" by "+screen.height+". \nFor best results, please change the resolution.")
//-->
</script>

-----------------

line brake: \n

;)

mabbutt
07-10-2003, 12:53 PM
Thank you very much !!!

:) :)