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

  • SEARCH
  • Home
  • 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 8965437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:48:09+00:00 2026-06-15T16:48:09+00:00

When I load with the current script some csv file. Textarea not present the

  • 0

When I load with the current script some csv file. Textarea not present the right format like in csv format:

1.csv:

text1
text2

Now 1.csv output:

text1 text2

Expected 1.csv output:

text1
text2

Actually textarea is not able to create newlines for some unknown reason for me.

The script:

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <hta:application
     applicationname="MyHTA"    
     border="thick"
     borderstyle="normal"
     caption="My HTML Application"
     contextmenu="no"
     icon="myicon.ico"
     maximizebutton="no"
     minimizebutton="yes"
     navigable="no"
     scroll="yes"
     selection="no"
     showintaskbar="yes"
     singleinstance="yes"
     sysmenu="yes"
     version="1.0"
     windowstate="normal"
 >
 <script language="vbscript">  

Sub RunCommonDialog  
  Set objDialog = CreateObject("UserAccounts.CommonDialog")  
  objDialog.Filter = "CSV Files (*.csv)|*.csv|All Files|*.*" 
  objDialog.InitialDir = "C:\Documents and Settings\All Users\Desktop" 
  intResult = objDialog.ShowOpen  
  If intResult = 0 Then  
    Exit Sub  
  Else  
    CommonDialog.value = objDialog.FileName  
    CommonDialog_Span.innerHTML = objDialog.FileName  
    Const ForReading = 1
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objTextFile = objFSO.OpenTextFile(objDialog.FileName, ForReading)
    contents = objTextFile.ReadAll
    objTextFile.Close
    Set objFSO = Nothing
    Set objReadFile = Nothing
    PRE.innerHTML = contents
  End If  
End Sub  
 Sub reloadHTA()
 location.reload True
End Sub

</script>
<body> 
<input type="hidden" id="CommonDialog"><input type="button" onclick="RunCommonDialog" value="Browse..."><input class = "StdBtt Meta" type = "BUTTON" value = "Reset" onclick = "reloadHTA"><br>
<p>File: <span id="CommonDialog_Span"></span></p>
<textarea rows="4" cols="88" name="PRE" readonly="readonly">
</textarea> 
</body> 
  • 1 1 Answer
  • 0 Views
  • 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-06-15T16:48:10+00:00Added an answer on June 15, 2026 at 4:48 pm

    If you use a .hta that concentrates on your problem – e.g.

    <html>
     <head>
      <hta:application id="t"></hta>
      <title>t</title>
      <script language="vbscript">
       Sub ol()
         MsgBox "ol"
         a = Array("line1", "line2")
         document.all.ta1.value = Join(a, vbCrLf)
         document.all.ta2.innerHTML = Join(a, vbCrLf)
       End Sub
      </script>
     </head>
     <body onload="ol">
      <textarea id="ta1" rows="4" cols="88"></textarea>
      <textarea id="ta2" rows="4" cols="88"></textarea>
     </body>
    </html>
    

    you’ll see at a glance that your problem is caused by using .innerHTML instead of .value.

    (BTW: You should use a validator (tidy, …) on your .html)

    Update:

    Evidence:

    Evidence

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

Sidebar

Related Questions

How can I load a csv as a sheet of the current workbook in
This is my current demo .I am trying to load images dynamically and now
I load a JavaScript file which takes current page's URL as a parameter. Here
I have a pipe delimited file with some NULL date fields. I load this
I have some csv files, I need to open csv file, read first line
I am trying to load a CSV file into an array using ColdFusion (version
I can load the Color contents of the Current Window using GetDIBits but i
I'm writing a 'load' feature for my current iPhone app. Practically what I want
I'm trying to load my UITableView with distance from current location. I'm taking small
Trying to load a shared lib out of the current '.' dir in a

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.