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

250
Views
add a button below textarea in powerportals using jquery

I was wondering if there is away to add a button below a textarea using jquery. I have generated html like below in power portals page.

<textarea rows="7" cols="20" maxlength="2000" id="description" class="textarea form-control "></textarea>

I would like to add a button just below it. I am using the code below but it is not displaying the button at all.

$(document).ready(function () {
$("#description").append("<button type='button' id='btnSave' class='btn' 
style='color:#fff;background-color:#36f;border-color:36f;' 
onclick='savefunction'>Save</button><br><br>");
});
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You cannot put html inside textarea, you can only put text inside it. If you want to display a button within a text area, you can try appending the button on the parent of text area. and position the button accordingly.

$(document).ready(function () {
$("#textwrapper").append("<button onclick='savefunction' id='btnSave' type='button' style='color: #fff; background: #36f; border-color:#36f; display:block; margin-left:auto;'>Save</button><br><br>");
});
* {
  box-sizing: border-box;
}
.textarea-wrapper {
  position: relative; 
  display:inline-block;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div id="textwrapper" class="textarea-wrapper">
<textarea rows="7" cols="20" maxlength="2000" id="description" class="textarea form-control "></textarea>
</div>

about 4 years ago · Juan Pablo Isaza Report
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!