Rythmist wrote:
> Use \n
>
> example: alert("Welcome\nTo\nMy World")
Well, you said that would work, but I tried it before and no dice. Since you
said it would work, I thought about the situation a bit more and realized
that I had to use \\n instead, since the javascript was being generated
inside a perl script. Escape, escape, escape! Got it now.
Thanks,
Jack
> >Well, I've poked around a bunch of javascript sites and can't find an
> >answer:
> >
> >Does anyone know what will create a new line in an alert box?
> >
> >For example, I'd like to put each new msg line in the alert on a
> new line,
> >rather than have them all on one line. In perl it's \n. Anyone know the
> >compatible term in javascript?
> >
> >Example in need of new line when a value is empty:
> >
> >function verifydata(){
> > var msg = ''
> > if (document.clientdetails.cust_num.value == "") {
> > msg = msg + "Account number"
> > }
> > if (document.clientdetails.bus_name.value == "") {
> > msg = msg + "Business name"
> > }
> >
> > // send an alert if there is data missing
> > if (msg != ''){
> > alert(msg)
> > return false
> > } else {
> > return true
> > }
> >}
> >
> >TIA,
> >Jack
> >
> >____________________________________________________________________
> >--------------------------------------------------------------------
> > Join The Web Consultants Association : Register on our web site Now
> >Web Consultants Web Site : http://just4u.com/webconsultants
> >If you lose the instructions All subscription/unsubscribing can be done
> >directly from our website for all our lists.
> >---------------------------------------------------------------------
>
>
____________________________________________________________________
--------------------------------------------------------------------
Join The Web Consultants Association : Register on our web site Now
Web Consultants Web Site : http://just4u.com/webconsultants
If you lose the instructions All subscription/unsubscribing can be done
directly from our website for all our lists.
---------------------------------------------------------------------