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 Quote Link to comment 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> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.