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

  • Home
  • SEARCH
  • 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 9173149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:31:19+00:00 2026-06-17T16:31:19+00:00

I have javascript code below, it’s working but within Firebug it says document.form1.element[i] is

  • 0

I have javascript code below, it’s working but within Firebug it says

document.form1.element[i] is not defined

and then it works fine

function set_action(){

for (var i=0;i<=3;i++)
{

    if (document.form1.PayType[i].checked == true)

        {
            var billerid = document.form1.billerid[i].value;
                            document.form1.action = billerid +"_mypag.htm";
        }
}

and my html markup is as below

<form name="form1" action="...">
<input name="PayType" type="radio" value="0" id="ultipay" class="radiobtn" checked/>
<select name="billerid" class="dropbox">
<option>item1</Option>...
</select>
<input name="PayType" type="radio" value="1" id="ultipay" class="radiobtn"/>
<select name="billerid" class="dropbox">
<option>item1</Option>
</select>
<input name="PayType" type="radio" value="2" id="ultipay" class="radiobtn"/>
<select name="billerid" class="dropbox">
<option>item1</Option>...
</select>
<input name="PayType" type="radio" value="3" id="ultipay" class="radiobtn"/>
<select name="billerid" class="dropbox">
<option>item1</Option>...
</select>
<input type="button" onclick="set_action()" value="submit">
</form>

I don’t know why I am getting this error.

  • 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-17T16:31:20+00:00Added an answer on June 17, 2026 at 4:31 pm

    If you have only one radio button named PayType, then you need to address it with document.form1.PayType. It is addressed as an array document.form1.PayType[i] iff there are multiple radio buttons with the same name. For instance:

    <input name="PayType" type="radio" value="0" id="ultipay0" class="radiobtn" checked="checked" />
    <input name="PayType" type="radio" value="1" id="ultipay1" class="radiobtn" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a working JavaScript code below which dynamically creates JSON object using JSON.parse
i have a javascript code below. bgCustom = { 'items':[], 'items_num':3, 'element':'#bg_custom_thumbs', 'next': '#bg_custom_next_thumb',
I have this javascript and php/html code below: <script> var examInput = document.getElementById('newAssessment').value; var
I have below JavaScript Code. It not getting called when page is loaded. Even
I have this javascript code below that uses jquery, it is suppoed to be
I have a dialog box, created with the code javascript and HTML generated below.
I have an issue in my JavaScript function. Below is my js code: function
Am unable to understand why Cannot the below javascript code is not called from
I have this javascript code below: <!doctype html> <html lang=en> <head> <meta charset=utf-8 />
I have some javascript code like below function mask(eventVal,val){ var len = val.value.length; var

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.