Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

140
Views
Array content empty after taking input in text area

The inputs I am taking in the textarea are not reflecting in the console (Check code snippet) :

Array(1)

content: ""

line: 0

Problem Statement - Table values -> Make JSON structure -> Pull/Push to db Your app should read a JSON in the same structure, and populate values. And send a JSON in same structure to db. For loading and saving

        $(document).ready(function(){
    var textarea = $('textarea').val();
    var linebreak = textarea.split('\n');
    var length = linebreak.length;
    var data = [];
    console.log(length);
    for ( var i = 0 ; i<length ; i++){
          
        data.push({ 'line': i , 'content': linebreak[i] });
        console.log(data);
    }
});
  
<!DOCTYPE html>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="index.js" async></script>
<html>
    <head>
        <title>Basic Web Page</title>
    </head>
    <body>
        <textarea class="form-control ph" id="notes_inputbox" rows="5" placeholder=""></textarea>
        <textarea class="form-control ph" id="notes_inputbox" rows="5" placeholder=""></textarea>
        <textarea class="form-control ph" id="notes_inputbox" rows="5" placeholder=""></textarea>
        
    </body>
</html>

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!