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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:22:32+00:00 2026-06-09T14:22:32+00:00

I have a web page which posts to a server and the server returns

  • 0

I have a web page which posts to a server and the server returns some HTML:

<select id="selectmodel"><option value="0">Model</option></select>

This HTML goes into a TD tag (#td2) as shown below and all seemingly works fine:

$.post("/cgi-bin/gcp.dll/modelx",{ manufacturerVal: window.manufacturerVal}, function(data) {$('#td2').html(data)});

However, it seems that some other ID’s disappear. When I try the line below before the post, it works fine. Afterwards, it no longer works:

$("#td5").click(function() {if (document.getElementById("table2")){alert("table2 exists")}else{alert("table2 does not exist")}});

The TD tag (#td5) lies below the TD tag (#td2). When I try the same test on #table1 – a table that contains #td2 and #td5 – it does not disappear. Here is a simplification of the HTML:

<table id="table1"><tr>
<td id="td2"> ... </td>   <-- dynamically created select tag goes here
<td id="td4"><table id="table2"><tr><td> ... </td></tr></td> 
<td id="td5"> ... </td>
</tr></table> 

Any ideas?

  • 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-09T14:22:33+00:00Added an answer on June 9, 2026 at 2:22 pm

    After following the link in your comment above:

    The table with id table2 is inside the td with id td4. You have the change1() function bound to the change event of the select element. That function includes this line:

    $("#td4").html("&nbsp;");
    

    Which overwrites the original html with the non-breaking space. So the 2nd alert is correct. table2 does not exist.

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

Sidebar

Related Questions

I have a web page with a read-only text box which shows some HTML
I have an webpage which posts some data and then redirects to a page
I have web page which is passing a querystring parameter to page 2: <a
I have a web page which uses in PHP and a jQuery DataTable to
I have web page in PHP which displays all records in a table. I
I have a web page in which a fair amount of the content is
I have a web page on which i am applying Ajax enabled update progress
I have a Webforms, AJAX-enabled web page which, when rendering large amounts of data,
I have a web page that displays dynamic data which changes every 2 seconds.
I have a web-page with complicated form. Also, there is a button preview, which

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.