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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:04:04+00:00 2026-06-03T08:04:04+00:00

my code was working and taking my text from textbox to next page +

  • 0

my code was working and taking my text from textbox to next page + my Input control to next page via js but suddenly there seems to be a blunder whats wrong in following code

<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.js"></script>
<script type="text/javascript">
var i=2;
function AddTextbox(){
container.innerHTML=container.innerHTML+'<input type="text" name="'+ i + '">';
i++;
}
</script>

</head>
<body>
<form action="next.php" method="post">
<input type="text" name="1" />
<input type="button" onClick="AddTextbox" name="btn" value="add" />
<input type="submit" name="submit" value="sub" />
<div id="container"></div>
</form>
</body>
</html> 
  • 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-03T08:04:05+00:00Added an answer on June 3, 2026 at 8:04 am
    <html>
      <head>
        <script>
          function addElement(tag_type, target, parameters) {
            //Create element
            var newElement = document.createElement(tag_type);
    
            //Add parameters
            if (typeof parameters != 'undefined') {
              for (parameter_name in parameters) {
                newElement.setAttribute(parameter_name, parameters[parameter_name]);
              }
            }
    
            //Append element to target
            document.getElementById(target).appendChild(newElement);
          }
        </script>
      </head>
      <body>
        <div id="targetTag"></div>
        <input type="button" onClick="addElement('INPUT','targetTag',{id:'my_input_tag', name:'my_input_tag', type:'text', size:'5'}); return false;" value="Add Input Tag" />
        <input type="button" onClick="addElement('INPUT','targetTag'); return false;" value="Add Input Tag W/O Parameters" />
      </body>
    </html>
    

    Note If you bother to check the DOM after executing this in IE, you’ll see that the name field is not available to you. IE declares this field to be read-only which is why you don’t see it. The field will be properly submitted, however, as shown in this test code:

    <?php
    if (isset($_POST)) {
      print '<pre>'.print_r($_POST,true).'</pre>';
    }
    ?>
    <html>
      <head>
        <script>
          function addElement(tag_type, target, parameters) {
            //Create element
            var newElement = document.createElement(tag_type);
    
            //Add parameters
            if (typeof parameters != 'undefined') {
              for (parameter_name in parameters) {
                newElement.setAttribute(parameter_name, parameters[parameter_name]);
              }
            }
    
            //Append element to target
            document.getElementById(target).appendChild(newElement);
          }
        </script>
      </head>
      <body>
        <form method="post">
        <div id="targetTag"></div>
        <input type="submit" value="Check"/>
        </form>
        <input type="button" onClick="addElement('INPUT','targetTag',{'id':'my_input_tag', 'name':'my_input_tag', 'type':'text', 'size':'5'}); return false;" value="Add Input Tag" />
        <input type="button" onClick="addElement('INPUT','targetTag'); return false;" value="Add Input Tag W/O Parameters" />
      </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i got this code working and it to return the last tweet from my
I'm working on a page where I've listed some entries from a database. Although,
I’m taking over a Drupal site where I’m currently working on changing the text
I have this code working in C#: var request = (HttpWebRequest)WebRequest.Create(https://x.com/service); request.Method = GET;
Why isn't this code working? I've been stuck on this for 2 days. public
We have the following code working for a complex rails form with checkboxes. I'm
I have this JQuery code working however I need to know whether how to
I'm trying to get some code working that a previous developer has written. Yep,
I'm trying to get the following code working: string url = String.Format(@SOMEURL); string user
Why isn't the following piece of code working in IE8? <select> <option onclick=javascript: alert('test');>5</option>

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.