How to print a text in new line in client script of portal page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-15-2024 08:53 AM
Hi All,
I am updating a error message in login page.
I would to print the text line by line. But it is coming as continuous text.
I am trying as below in client script of portal page.
c.message = "Your account is locked.Please contact help to reset your password.\nToll Free1: 1800, or send an SMS to 1111"+'\n'+'Toll Free2: 1888, or send an SMS to 2222';
Please help me on this.
I would like to print as below.
Your account is locked.Please contact help to reset your password.
Toll Free1: 1800, or send an SMS to 1111
Toll Free2: 1888, or send an SMS to 2222
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-15-2024 09:13 AM
Hi @Madhavi2
Can you try following-
c.message = "Your account is locked. Please contact help to reset your password.<br>Toll Free1: 1800, or send an SMS to 1111<br>Toll Free2: 1888, or send an SMS to 2222";
Please mark my answer helpful and correct.
Regards,
Amit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-15-2024 10:18 AM - edited ‎04-16-2024 05:13 AM
Hi @Amit Pandey ,
Thank you for your reply. I tried this already. But no luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-16-2024 09:24 AM
Hi @Madhavi2
Give this a try-
c.message = "<div>Your account is locked. Please contact help to reset your password.</div><div>Toll Free1: 1800, or send an SMS to 1111</div><div>Toll Free2: 1888, or send an SMS to 2222</div>";
Try this too-
-->in some cases, \r\n or just \r might work instead of \n
c.message = "Your account is locked. Please contact help to reset your password.\r\nToll Free1: 1800, or send an SMS to 1111\r\nToll Free2: 1888, or send an SMS to 2222";
Regards,
Amit