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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:09:40+00:00 2026-05-29T07:09:40+00:00

This is my form <form id=edit method=post accept-charset=UTF-8 action=> <input type=hidden name=video_id[0] value=K94KNsN43BU><p>Title<br> <textarea

  • 0

This is my form

    <form id=edit method=post accept-charset=UTF-8 action=>
    <input type=hidden name=video_id[0] value=K94KNsN43BU><p>Title<br>
    <textarea rows=1 cols=40 id=title_0 name=title[0]>drugi</textarea>  
    <input type=button value=Copy onclick=copyTitle()><p>Description<br>
    <textarea rows=4 cols=40 id=desc_0 name=description[0]>drugi uiuhuih</textarea>
    <p>Tags (separated by coma)<br>
    <textarea rows=2 cols=40 id=tags_0 name=tags[0]>iko koko mooko</textarea><hr>
    <input type=hidden name=video_id[1] value=oYNIKpdTT9w><p>Title<br>
    <textarea rows=1 cols=40 id=title_1 name=title[1]>prvi oijoi</textarea>
    <p>Description<br>textarea rows=4 cols=40 id=desc_1 name=description[1]>prvi</textarea>  
  <p>Tags (separated by coma)<br><textarea rows=2 cols=40 id=tags_1 name=tags[1]>prvi, koko, youtube, impotr</textarea><hr>
    <input type=submit name=submit2 value=Submit></form>

what I’m trying to do is to make button that copies text from first textarea wich can be for example Title to all other Title textareas that appears on the page and their number depends on the choice of user.

This is the javascript

function copyTitle() {
    var title = document.getElementById("title_0").value;
    var count = document.getElementById("edit").lenght/3;
    var i=0;
    for (i=0;i<count;i++) {
        var text = document.getElementById("title_"+i);
        text.value = title;
    }
}

I’m dividing form lenght by 3 because there are Title, Description and Tags textareas.
What I’m doing wrong?

  • 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-05-29T07:09:41+00:00Added an answer on May 29, 2026 at 7:09 am

    A whole lot. Let’s start by putting quotes around property values (like this: id="title_0").

    Then for why your script is failing:

    It’s length not lenght

    You are forgetting the hidden input, the copy button and the submit button, which means you have to subtract 3 from the length before dividing it by 3 (or subtract 1 afterwards, obv.). That is, if you want to solve this problem in such an ugly manner (which, for example can’t handle an extra hidden input field in the form)

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

Sidebar

Related Questions

I am testing a form. It looks like: <form accept-charset=UTF-8 action=/the_action method=post> <select id=id
and with this form: (select * from mp3 aktif = '0') <form name=form method=post>
I have a form for editing notifications that looks like: <form action='edit.php' method =
I have an included object's form: <form method=post class=object_form id=event-core-form action={% url save_event_core_data event.id
I have this function to edit all fields that come from the form and
Ryan Bates' nifty_scaffolding, for example, does this edit.html.erb <%= render :partial => 'form' %>
I have this form: <form name=customize> Only show results within <select name=distance id=slct_distance> <option>25</option>
Hello i have this form filling javascript: function onLine(code,nn) { document.writeform.bericht.value+=code; document.writeform.bericht.focus(); document.writeform.nickname.value+=nn; write1();
I'm trying to change the form action based on the selected value from a
I'm using this code in one of my views: if request.method == 'POST': vehicle

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.