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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:12:37+00:00 2026-06-15T16:12:37+00:00

Hy! i am new to web development and just stuck at a point. I

  • 0

Hy! i am new to web development and just stuck at a point. I have a form at which 2 fields are generated by one drop down menu. Now the problem is I have generated one field and trying to get another field but due to lack of knowledge I am stuck. I just need little bit help if someone can

<form name="myform">
    <select name="optone" size="1" onchange="setOptions(document.myform.optone.options[document.myform.optone.selectedIndex].value);">
        <option value=" " selected="selected"> </option>
        <option value="1">Directory Submission</option>
        <option value="2">Articale Submission</option>
        <option value="3">Social Bookmarking</option>
        <option value="4">Blog Commenting</option>
        <option value="5">Forum Submission</option>
        <option value="6">Link Building</option>
    </select>
    No. Of Submissions: <select name="opttwo" size="1">
        <option value=" " selected="selected">Select any option of the above first</option>
    </select>
    Amount Payable:
</td>
<td>
    <input type="text" name="amount" onchange="document.myform.opttwo.options[document.myform.opttwo.selectedIndex].value;" />

Now my javascript is this:

function setOptions(chosen) {
    var selbox = document.myform.opttwo;
    selbox.options.length = 0;
    if (chosen == " ") {
        selbox.options[selbox.options.length] = new Option('Please select one of the options above first',' ');
    }
    if (chosen == "1") {
        selbox.options[selbox.options.length] = new Option('100 Directory Submission', '$9.99');
        selbox.options[selbox.options.length] = new Option('100 Directory Submission', '$9.99');
        selbox.options[selbox.options.length] = new Option('300 Directory Submission','$29.99');
    }

    // and like this other options will come too.
}

I just want to know that how th field of amount payable will get the amount.

  • 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-15T16:12:38+00:00Added an answer on June 15, 2026 at 4:12 pm

    Do you mean

    DEMO

    function setOptions(chosen) {
        var selbox = document.myform.opttwo;
        selbox.options.length = 1; // no need to delete the first option
        if (chosen == "1") {
            selbox.options[selbox.options.length] = new Option('100 Directory Submission', '$9.99');
            selbox.options[selbox.options.length] = new Option('100 Directory Submission', '$9.99');
            selbox.options[selbox.options.length] = new Option('300 Directory Submission','$29.99');
        }
        document.myform.amount.value="";
        // and like this other options will come too.
    }​
    

    with this code

          <select name="opttwo" size="1" onchange="this.form.amount.value=this.value;">
            <option value=" " selected="selected">Select any option of the above first</option>
          </select>
          Amount Payable:
       </td>
       <td>
         <input type="text" name="amount" readonly="readonly" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to web development, and have found myself stuck on how to
I'm new to web development and am just wondering about best practices for java
Just to give you a fair idea, I am new to the web development
I am quite new to client-side web development, so just feel free to edit
I’m new to web development but have coding experience (Java) and I’m trying to
I am new in web development but I have worked with html and php
I'm new to web design/development; I have the following code to check if data
I'm new here (and to web development in general), and I have been trying
I am very new to web development. In fact, I am just starting to
I'm new to web development, but I have been looking ofr a solution to

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.