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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:28:40+00:00 2026-05-31T04:28:40+00:00

I have not found an answer to this online nor does the debugger tell

  • 0

I have not found an answer to this online nor does the debugger tell me enough to understand what alternatives I might use. Is it possible to post the “fill” value into the text boxes using an array to the effect I’m trying to use below? I could write document.form.a.value = fill; document.form.b.value = fill; etc., but a loop and array seems more more simplified and efficient.
Here’s a simplified version of the code that’s giving me an error:

<script type="text/javascript">
function postData() {
var fill = 0.0;
var txtBoxLetter = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"];
    for (var i = 0; i < txtBoxLetter.length; i++)   {
        document.form.txtBoxLetter[i].value = fill; // Error on this line
    }
}
</script>

<form name="form" method="" action="">
<input type="text" name="a" size="1" readonly="true">
<input type="text" name="b" size="1" readonly="true">
<input type="text" name="c" size="1" readonly="true">
<input type="text" name="d" size="1" readonly="true">
<input type="text" name="e" size="1" readonly="true">
<input type="text" name="f" size="1" readonly="true">
<input type="text" name="g" size="1" readonly="true">
<input type="text" name="h" size="1" readonly="true">
// etc.
</form>

Thanks for the 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-05-31T04:28:41+00:00Added an answer on May 31, 2026 at 4:28 am

    MDN form elements

    document.form.elements[ txtBoxLetter[i] ].value = fill;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This may have a simple answer (and I hope it does) but looking online
So far, I have not found a clear answer to this. I'd like to
This is pretty specific and I have not found an answer yet. I am
I have done a search for this problem, and have not found an answer,
I have searched for this answer and have not found it. I have music
Here is a hum-dinger of a problem that I have not found an answer
I have scanned 'the Google' and have not found the definitive answer on whether
I know this issue has been touched on here but I have not found
I've been trying to find a way to do this but, have not found
I have found this tutorial online http://net.tutsplus.com/tutorials/php/creating-a-php5-framework-part-1/ I have created myself a simple sort

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.