• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 248
  • Last Modified:

Adding a linespace to javascript var

Hello, I'm creating a simple dialogue box and I need to add a linespace to the message.

var answer = confirm ("You are about to delete the selected record."+<br>+"Click OK to continue and save changes. Click Cancel to return to the screen.");

What is the correct way to place the br in the text?

Thanks
0
horalia
Asked:
horalia
1 Solution
 
Shaun KlineLead Software EngineerCommented:
JavaScript uses the C/C++ syntax for new lines. Try:
var answer = confirm ("You are about to delete the selected record.\nClick OK to continue and save changes. Click Cancel to return to the screen.");

Open in new window

0
 
horaliaAuthor Commented:
Fast and accurate
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now