Connecting Tech Pros Worldwide Forums | Help | Site Map

Carriage return inside a message of alert

hivan
Guest
 
Posts: n/a
#1: Jul 20 '05
Hi,
I have a calendar where i write my events.
If I have 2 events in the same day, how to put a carriage return between the
events in the alert part of message?
For example, I want this alert message:

Event one to the office.
Event two to the store.

The string that I use actually is:

fAddEvent(2003,9,17," Event one. Event two.","alert('Event one to the
office. Event two to the store.');","#00ff00","red");

Thanks. Ugo




nice.guy.nige
Guest
 
Posts: n/a
#2: Jul 20 '05

re: Carriage return inside a message of alert


While the city slept, hivan <ugodardi@libero.it> feverishly typed:
[color=blue]
> Hi,
> I have a calendar where i write my events.
> If I have 2 events in the same day, how to put a carriage return
> between the events in the alert part of message?[/color]

use \n
[color=blue]
> For example, I want this alert message:
>
> Event one to the office.
> Event two to the store.
>
> The string that I use actually is:
>
> fAddEvent(2003,9,17," Event one. Event two.","alert('Event one to the
> office. Event two to the store.');","#00ff00","red");[/color]

alert('Event one to the office.\nEvent two to the store.');

Hope that helps,
Nige

--
Nigel Moss.

Email address is not valid. nigel@nigenetDOG.org.uk. Take the dog out!
http://www.nigenet.org.uk | Boycott E$$O!! http://www.stopesso.com
"How strange the change from major to minor..."


hivan
Guest
 
Posts: n/a
#3: Jul 20 '05

re: Carriage return inside a message of alert


Yes it works. Thanks

"nice.guy.nige" <nigel_moss@deadspam.com> ha scritto nel messaggio
news:bjv5np$mig66$1@ID-112325.news.uni-berlin.de...[color=blue]
> While the city slept, hivan <ugodardi@libero.it> feverishly typed:
>[color=green]
> > Hi,
> > I have a calendar where i write my events.
> > If I have 2 events in the same day, how to put a carriage return
> > between the events in the alert part of message?[/color]
>
> use \n
>[color=green]
> > For example, I want this alert message:
> >
> > Event one to the office.
> > Event two to the store.
> >
> > The string that I use actually is:
> >
> > fAddEvent(2003,9,17," Event one. Event two.","alert('Event one to the
> > office. Event two to the store.');","#00ff00","red");[/color]
>
> alert('Event one to the office.\nEvent two to the store.');
>
> Hope that helps,
> Nige
>
> --
> Nigel Moss.
>
> Email address is not valid. nigel@nigenetDOG.org.uk. Take the dog out!
> http://www.nigenet.org.uk | Boycott E$$O!! http://www.stopesso.com
> "How strange the change from major to minor..."
>
>[/color]


Closed Thread