I'm trying to update a piece of a webpage via JQuery.
This doesn't work: (This is from an AJAX action so I don't get an error message._
Is there a better way of mixing the quotes? Or am I looking down the wrong path?
Originally posted by Bear Bibeault: I just tried it using jquery-1.2.3 with no difficulties. [/CODE]
That example works for me too. Looks like my hunch about the quotes was wrong. I tried some other HTML strings to further "guess" at the problem. Works: $("#message").html("<b>test<\/b>"); Fails: $("#message").html("<li>test<\/li>");
This means you are right that the quotes have absolutely nothing to do with it. Neither does the HTML symbols since the bold one works. (<input> was never in my examples - I just used it to simplify which might have obscured things.)
What error are you seeing? ]
Tomorrow, I'm going to try to reproduce the problem without involving AJAX so I can actually see an error and more of what's going on.
[QBP.S. It's just a matter of style (and completely unrelated to your issue), but I would have coded it as[/QB]
That's good to know for the future. I didn't write this particular line of code. And it looks like it needs to be written this way as it is really outputting some dynamic HTML so I don't know the tag/attribute in advance.
The standalone file was very helpful. I was able to try the same thing that "didn't work" standalone and it "did work". This is good as the problem doesn't lie with using JQuery and it's likely something else on the page. I'll look around some more at that end.