Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 339623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:32:25+00:00 2026-05-12T10:32:25+00:00

function text_window() { var xmlDoc; if (window.XMLHttpRequest) { xmlDoc=new window.XMLHttpRequest(); xmlDoc.open(GET,cd_catalog.xml,false); xmlDoc.send(); xmlDoc=xmlDoc.responseXML; }

  • 0
function text_window()
{

var xmlDoc;
if (window.XMLHttpRequest)
  {
  xmlDoc=new window.XMLHttpRequest();
  xmlDoc.open("GET","cd_catalog.xml",false);
  xmlDoc.send("");
  xmlDoc=xmlDoc.responseXML;
  }
// IE 5 and IE 6
else if (ActiveXObject("Microsoft.XMLDOM"))
  {
  xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
  xmlDoc.async=false;
  xmlDoc.load("cd_catalog.xml");
  }

document.write("<textarea rows=\"10\" cols=\"90\" ID=\"Textarea1\" NAME=\"Textarea1\" readonly=\"readonly\">");

var x=xmlDoc.getElementsByTagName("CD");
for (i=0;i<x.length;i++)
  { 
  document.write(x[i].getElementsByTagName("ARTIST")[0].childNodes[0].nodeValue);  

//How do I put a line break here?  

  document.write(x[i].getElementsByTagName("TITLE")[0].childNodes[0].nodeValue);
  }
document.write("</textarea>");
}  

I would like to edit the scrolling textarea where I wrote the comment “//How do I put a line break here?”
Currently, it prints all on the same row/line.

Output:
Bob Dylan” “Empire BurlesqueBonnie TylerUKHide your heartDolly PartonUSAGreatest HitsGary MooreUKStill got the bluesEros…….

Desired Output:
Bob Dylan Empire
BurlesqueBonnie Tyler Hide your heart
Dolly Parton Greatest Hits
Gary Moore Still got the bluesEros…….
etc.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T10:32:25+00:00Added an answer on May 12, 2026 at 10:32 am

    try

    document.write("\n")
    

    in the place where you have that comment

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Should I use textbox.text.Trim() function every time when I insert any data from web
I have a text area and a function to do syntax highlighting on it.
I need a function to return a suffix for days when displaying text like
I wish to test a function that will generate lorem ipsum text, but it
I have the following intentionally trivial function: void ReplaceSome(ref string text) { StringBuilder sb
I'm using the PHP function imagettftext() to convert text into a GIF image. The
Is there a built in Javascript function to turn the text string of a
I used the method $(#dvTheatres a).hover(function (){ $(this).css(text-decoration, underline); },function(){ $(this).css(text-decoration, none); } );
function returnsAnArray () { return array ('test'); } echo returnsAnArray ()[0]; generates a syntax
My problem: I am sending a request to a servlet from an AJAX function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.