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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:13:41+00:00 2026-05-26T05:13:41+00:00

Have a problem… I am appending a form element to a page with jQuery.

  • 0

Have a problem… I am appending a form element to a page with jQuery. However i cannot access the form element with js. I think this is because the dom has loaded and the form element isn’t available in the dom. Is there a work around for this. I know I can append an Iframe with the form inside but would rather not.

Heres an example…

    <body>

    <div id=wrapper>
    </div>
       <div onlclick='newInput()'>
          Add Detail...
       </div>
    </body>

And the jQuery…

  function newInput(){

   var container = "<div id='input-container'><input id='input' type='text' value='insert new data here'></input><div id='submit onclick='submitInput()'>SUBMIT</div>";


   $('div#wrapper').append(container);

   }

   function submitInput(){

   var input = document.getElementById('input').value;

   ....do stuff with ne input here....
   }
  • 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-26T05:13:41+00:00Added an answer on May 26, 2026 at 5:13 am

    Why do you have two single quotes shown below ?

    onclick='submitInput()''  <--- 
    

    I would double check and make sure you’re not getting any errors in the console, just in case the js is throwing an error. Your code works for me http://jsfiddle.net/4xxGJ/

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

Sidebar

Related Questions

I have problem compilin this code..can anyone tell whats wrong with the syntax CREATE
I have problem creating new instance of excel 2007 using VBA (from Access 2002).
i have problem with jquery submit and post. I would like to submit a
Have problem while getting data from Memcached on .NET MVC solution. I have this
I have problem with basic VIM function:(I tried googling and cannot find the answer)
i have problem passing data from one page to another using GET, for example
I have problem to update user data in cakephp. When I submit form I
I have problem with this method in NLog library: NLog.Targets.Wrappers.AsyncTargetWrapper.ProcessPendingEvents(object state) It consume too
I have problem with configuring NODE.JS. I was trying to install node.js with this
I have problem to make work a resource file. This is my simple code

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.