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 8506697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:39:41+00:00 2026-06-11T02:39:41+00:00

I have to paste the data in HTML input text fields in the following

  • 0

I have to paste the data in HTML input text fields in the following format from MS excel or same type of sheets:

123456  12  this
234567  3   before blank
111111  3   
222222  3   after blank

I copied the data from MS Excel which contain the single tab between 12 and this and so on.. I have tried to implement it but didn’t work for me. The above data will be pasted into a text area and it save into a another JavaScript variable into the following format:

<row dc= '" + arr[0] + "' al='" + arr[1] + "' msg='" + arr[2] + "' />

Where arr[0] is 123456, and arr[1] is 12 and arr[3] is this and so on by appending the value.

  • 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-11T02:39:42+00:00Added an answer on June 11, 2026 at 2:39 am
    var str=document.getElementById("myTextarea").value
    var t=str.split("\n");
    for (var i=0;i<t.length;i++)
    {
      var arr=t[i].split("\t");
      document.write("'<row dc= '" + arr[0] + "' al='" + arr[1] + "' msg='" + arr[2] + "' />'")
    }
    

    Working Sample:-

    <!DOCTYPE html>
    <html>
    <body>
    <script>
    function submit_a () {
    var str=document.getElementById("allocationstatus").value
    //str=str.replace('\t','&#09;');
    //document.getElementById("allocationstatus").value=str;
    var t=str.split("\n");
    var s='';
    for (var i=0;i<t.length;i++)
    {
      var arr=t[i].split("\t");
      s ="'<row dc= '" + arr[0] + "' al='" + arr[1] + "' msg='" + arr[2] + "' />'";
      alert(arr.length);
      for (var j=0;j<arr.length;j++)
    {
      //alert(arr[j]);
    }
      //document.write(s);
    }
    }
    </script>
    <textarea rows = "5" cols = "80"  id = "allocationstatus" >stat&#09;do&#09;one
    stat1&#09;do1&#09;one1
    stat2&#09;do1&#09;one1</textarea>
    <input type = "button" onclick = "submit_a();"/>
    
    </body>
    </html> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If have a html form like <form method=POST action=http://.../file.php> <input type=text name=data id=data />
I have following type of data ntrt = paste (EL, 1:4, sep= ) repl
I have the following: <div class=btn-group> <input disabled=disabled id=dialogType> <button data-toggle=dropdown class=dropdown-toggle> <span class=caret></span>
I have a normal textbox in my application. I can paste data to it
i have such code (copy paste from wiki). Its multiplication of those big numbers
I have a textarea within an HTML page into which my users paste content.
I have JavaScript code which copies the value of input file and paste it
Hello i have an html form and i'm posting data but i'm unable to
I have the following Javascript to copy the user's textarea input in this iPhone
Does anyone have a string they paste in when when testing html forms? Just

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.