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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:02:44+00:00 2026-05-12T00:02:44+00:00

I have a div inside of a table which is inside of a form

  • 0

I have a div inside of a table which is inside of a form that I would like to update

<form id="login_form" method="post" action="#" onsubmit="return false;"><table> 
<tr><td>Username</td><td><input type="text" name="name" id="login_name"></td></tr>
<tr><td>Password</td><td><input type="password" name="password" id="login_password"></td></tr>
<tr><td><input type="checkbox" name="keep_logged" id="login_keep" checked></td><td>Keep me logged in on this computer</td></tr>
<tr><td colspan=2><br><INPUT type="submit" name="Submit" value="Submit" onclick="submitLogin();">
<INPUT type="reset" name="Cancel" value="Cancel" id="login_cancel"></td></tr>
<tr><td colspan=2><div id="result_div"></div></td></tr>
</table>
</form>

I have tried numerous methods to update that div, but I can not seem to get it to work.
For example:

$("div#result_div").html("My text is changed!");
$("#result_div").html("My text is changed!");
document.getElementById('result_div').innerHTML = 'My Text is changed!';

I’ve tried changing it from a div to a span with the same results. If I move the div outside of the table/form the text update works perfectly, so I’m fairly certain my code is being excuted correctly.

Any help would be apperciated.

Thanks.

edit: I realized this is inside of a Jquery-ui dialog box, I’m sorry for ommiting that piece of information orginally.

  • 1 1 Answer
  • 1 View
  • 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-12T00:02:44+00:00Added an answer on May 12, 2026 at 12:02 am

    Your code snippet works for me, so there’s nothing inherently wrong with what you’re doing. You’ve omitted some crucial detail from the surrounding code…

    • Where are you trying to do the update from? $("#result_div") will only work if you have that <script> below the <div> element on the page, or if you do it from a $(document).ready(...) callback function so it only executes after the page is loaded.

    • There’s only one element with id="result_div", right?

    • If you display $("#result_div").html() immediately after setting it, is it set correctly?

    • Do you see any JavaScript errors in your browser’s JS error log/console from other scripts on the page?

    • You’re not serving up the page with an XHTML <!DOCTYPE> are you? Or with the application/xhtml+xml MIME type?

    • What gets displayed if you just do alert($("#result_div").length)?

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

Sidebar

Related Questions

Hi, I have a div tag with id which contains table inside. I want
Per the jsfildde below, I have a table inside a div( #body ) that
I have one div inside which I have one table. In this table as
I have a HTML table which is inside of a div element and I
I have a div inside a table cell. When I click in the table
I want to append a div inside a div which have many divs inside
I have a div[class=container] and inside is div[class=item] like: <style type=text/css> .container{ height:50vh; width:
I have div having class name .modalPopup inside the div I have multiple table
I have a div , which contains a table . Everything is working as
I have a DIV tag. Inside the DIV, I have a Table and in

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.