I am rendering my div with a javascript from the server side code.
The script when rendered on clitn makes another call asyncnronously and gets some data (an image) to be displayed ,depending upon the parametrs sent. However, when i try to see the page’s source , i don’t get the “image tag” in it, but when i see it through firebug or IE developer tool bar, i get to see the image..
When I am trying to get the image object thru javascript, it doesnt return anything.
Pls let me know how should i get an indication whether the image has been rendered on client or not??
When you view source in a browser, you get to see the source code as it was received. Anything that modifies it in the page is not shown. You can see changes to the HTML/DOM by viewing the code in one of the browser dev toolbars like the IE Dev toolbar, the developer toolbar in Chrome/Safari, or Firebug.
To find out if an image has rendered I believe you can bind the load event of the image to tell your code that it was indeed loaded. JQuery’s .load() event is something I have used for this in the past, but there are caveats, see http://api.jquery.com/load-event/