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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:22:27+00:00 2026-06-14T15:22:27+00:00

I have programmed a script– First I have created a <div>….</div> which is hidden

  • 0

I have programmed a script– First I have created a <div>....</div> which is hidden on pageload. Then I have created an empty textbox. Now when anyone clicks a button then the whole content of the hidden <div>....</div> will be loaded in the textbox. Heres the code of it:

<div id="hiddendiv" style="display: none;">some content</div>
<button onclick="copyfunction();">click me</button>
<textarea id="textarea"></textarea>

<script>
function copyfunction() {
var textarea = document.getElementById('textarea');
var hiddendiv = document.getElementById('hiddendiv');
textarea.value = hiddendiv.innerText;
}
</script> 

This JavaScript is working fine on my webpage when i am viewing it on any other browser. But when viewed in firefox, the textbox shows “undefined” as the output when the button is clicked.
Note: All Java Add-ons are enabled and up to date. Even tried clearing all cookies but it didn’t help.

  • 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-14T15:22:28+00:00Added an answer on June 14, 2026 at 3:22 pm

    There’s no innerText in FF, rather it’s textContent.

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

Sidebar

Related Questions

then, elif, else statement that I have programmed in a bash script. I know
I have programmed a proxy.php script (listed below), which would fetch an image specified
I have a webservice programmed in coldfusion which I'm attempting to consume using c#.net.
I have PL/SQL function, which is programmed to sort a set of data. This
I have created a php script to import rss feed into the database. The
I have a pagination script, which can be seen here: http://www.automotori6282.tk/phpsandbox/ This is the
I currently have an ASP.NET script for a TV guide which displays the data
I have programmed a very simple script with jQuery. The idea is to fade
I have programmed a shopping list. The footer contains buttons for actions on a
I have programmed an emulator, but I have some doubts about how to organizate

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.