1

I've a script block in HTML which basically has some JSON content. I would like to replace contents inside it using jQuery. I did something like this:

$("#data").html(newjson);

Above statement only works with Firefox. It does not work with IE? How do I make this work in IE.

4
  • can you copy the string newjson and post it here? Commented Aug 26, 2010 at 23:16
  • pardon me, but what difference does it make? Commented Aug 26, 2010 at 23:23
  • It makes a difference, because .html() works fine in all modern browsers. I presume it's got something to do with the code you're adding. Commented Aug 26, 2010 at 23:27
  • What do you mean does not work. Did you get an error, did js execution stopped, etc? Commented Aug 27, 2010 at 2:05

1 Answer 1

1

Have a try removing the script element and adding a new one with your new json.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.