winmastergames Posted December 4, 2007 Share Posted December 4, 2007 I have a Ajax website HERE: http://www2.winmastergames.com/AJAXTEST-3509/bloodscars/index.html If you click Home you can see the image borders but then it goes blank whats wrong is there another way to load Images in Ajax because i have only just started using ajax Link to comment https://forums.phpfreaks.com/topic/80078-loading-pictures-in-a-ajax-website/ Share on other sites More sharing options...
mainewoods Posted December 5, 2007 Share Posted December 5, 2007 you have multiple javascript errors coming up on page load. 'object not found' was one of them. The way you load a new image with ajax is you send an image tag back through the ajax pipe and them push that into your page object: <div id="someID"></div> <script> // I'm simulating an ajax return of an image tag below ajaxreturn = '<img src="http://domain.com/graphic.gif">'; document.getElementById('someID').innerHTML = ajaxreturn; // at this point, the image 'graphic.gif' should be showing in the div </script> Link to comment https://forums.phpfreaks.com/topic/80078-loading-pictures-in-a-ajax-website/#findComment-407054 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.