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

The Archive Base Latest Questions

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

I’m trying to get a form (provided in HTML form from a callback) after

  • 0

I’m trying to get a form (provided in HTML form from a callback) after adding it to already present content. Adding it presents no issues and the form shows up properly. It is provided (as HTML) by the callback with the id= (placeid + “commentinput”) and added to the page. However, trying to do $(placeid + “commentinput”) does not return a proper jQuery element (for example, the alert(form.tagName) is supposed to return “FORM” but is always undefined instead).

function click_comment1(urlstr, id) { $.ajax({url: urlstr,success: success_on_get_form(urlstr, id)}); }
function success_on_get_form(urlstr, placeid) {
return function (val) {
    $("#" + placeid + "newcomment").html(val.replace("comments_body","body"));
    $("#pup").html($("#" + placeid + "comments").html());
    var form = jQuery("#" + placeid + "commentinput");
    var func = submit_comment(urlstr, placeid);
    alert(form.id);
    form.bind('submit',func);
} }

I’ve tried every other form of selection I know of at this point (basically, .children(). I’m new to jQuery). I’ve been hacking at this problem in various forms helplessly for 4 hours now. I’d appreciate any help, thank you.

<form action="" enctype="multipart/form-data" id="1commentinput" method="post">...</form>

This is the return from the callback; the middle part is omitted for space.

The #pup element seen is a popup as provided with this.

“#” + placeid + “newcomment” is a div within “#” + placeid + “comments”. These first 2 calls executing seemingly properly and render the callback provided form in the popup as desired.

The intent with all of this is to add a form to this popup, which is then used to make a second callback.

  • 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-14T08:15:05+00:00Added an answer on June 14, 2026 at 8:15 am

    Your problem most likely boils down to the fact that you are using invalid character to start your element ID..

    Change it to start with a valid character and it should work.

    http://www.w3.org/TR/html4/types.html#type-id

    ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens (“-“), underscores (“_”), colons (“:”), and periods (“.”).

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

Sidebar

Related Questions

I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a text area in my form which accepts all possible characters from
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Basically, what I'm trying to create is a page of div tags, each has
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to render a haml file in a javascript response like so:

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.