troubleshooting Question

innerHTML replaces & with &

Avatar of zotteke123
zotteke123 asked on
JavaScriptWeb Development
10 Comments3 Solutions1061 ViewsLast Modified:
I have an ajax script that returns a lot of data including an image tag
<img src="index.php?module=image&action=resize&pic=temp.jpg"/>

Now when I want to place the data into a div tag
var response = transport.responseText || "error while retrieving tab "+file;
document.getElementById('tabContent').innerHTML = response;
                      
innerHTML replaces & with &amp;
needless to say my image source link won't work of course. How can I stop innerHTML from replacing &?
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 3 Answers and 10 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros