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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:41:08+00:00 2026-05-14T21:41:08+00:00

I am creating a form with AJAX. The way I have created the form

  • 0

I am creating a form with AJAX. The way I have created the form is by writing out the html form elements in the innerHTML of the div where I’m putting the form

div.innerHTML += '&nbsp;<input type="text" name="day" id="eventDay" size="2" maxlength="2" value="'+response.day+'" />,';
div.innerHTML += '&nbsp;20<input type="text" name="year" id="eventYear" size="2" maxlength="2" value="'+response.year+'" /><br /><br />';

I’ve also tried doing this by using document.createElement('input'); but this is giving me problems as well. Once I have the form created, when I try to submit the values using another AJAX function, I am unable to access the values of the input boxes by using document.getElementById('eventDay').value; for instance. I don’t want to submit the form using HTTP directly, but would rather submit it with an AJAX function. I have no idea why I can’t access the values of these input boxes from the other function. Please 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-14T21:41:09+00:00Added an answer on May 14, 2026 at 9:41 pm

    I sheepishly have to admit that I had other elements on the page with the same ids as the input boxes I was using. So, the answer to this one is that I didn’t check my html well enough, and assumed the problem was with javascript. Thanks for the help.

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

Sidebar

Related Questions

I am creating one form in html using table. Which have one Drop down
I have an ajax form for creating a new Category. <%= form_for(@category, :remote =>
I'm creating an AJAX form. The problem is when I'm trying to create a
I am interested in creating an AJAX form submit in a jQuery overlay. I
I'm creating a basic form with ajax submit using jquery framework. This is my
Eariler I happily used the following code for creating form elements (inside Zend_Form descendant):
I am creating a form designer and have a toolbox that contains images of
Im creating a GSP form that i wish to submit using the $.ajax() call.
I am creating a jquery ajax popup comment form, but am having a problem
Feeling very proud of myself after creating a form with an AJAX submit, I

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.