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.
---------------------------------------------------------------------