insert html received from an ajax call into table cell

Greetings Experts,

I'm trying to get some html placed into a table cell that I receive from an ajax call and its not working. I know the html is correct because I put in an alert box and verified it (its a simple select box). Can someone have a look and see what I'm doing wrong?

function updateGamesDDL() {
                type: "POST",
                url: "some url",
                success: function (msg) {
                    $("#tdGames").append(msg);    //the html for tdGames is <td id='tdGames' name='tdGames'>
                error: function (xhr, option, err) {
                    alert("XHR Status: " + xhr.statusText + ", Error - " + err);

Open in new window

LVL 34
Big MontySenior Web Developer / CEO of Asked:
Who is Participating?
you need to show more code, there nothing wrong here

//the html for tdGames is <td id='tdGames' name='tdGames'>

you mean :

//the html for tdGames is <td id='tdGames' name='tdGames'></td>

try to validate your html, perhaps you miss an end tag and/or the page is malformed
Kiran SonawaneProject LeadCommented:
Another possibly is you have DOM (other html) with same id i.e tdGames by mistake in a page.
Big MontySenior Web Developer / CEO of Author Commented:
had some malformed HTML, I just assumed there was something wrong with the HTML. thx!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.