ajax image onload popup
===

`<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">`

`<html xmlns="http://www.w3.org/1999/xhtml">`

	`<head>`

`<script type="text/javascript">`

`function loadXMLDoc()
{`

`var xmlhttp;`

`if (window.XMLHttpRequest)`

  `{// code for IE7+, Firefox, Chrome, Opera, Safari`

  `xmlhttp=new XMLHttpRequest();`

  `}`

`else`

  `{// code for IE6, IE5`

  `xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");`

  `}`

`xmlhttp.onreadystatechange=function()`

  `{
  if (xmlhttp.readyState==4 && xmlhttp.status==200)`

    `{`

    `window.alert(xmlhttp.responseText);`

    `}`

  `}
`xmlhttp.open("GET","popup.html",true);`

`xmlhttp.send();`

`}`
`</script>`
`</head>`
`<body onload="javascript:loadXMLDoc()">

`<div id="myDiv"><h2>AJAX image popup</h2></div>`

`</body>`
`</html>`
Actually i want to use it on a joomla page, but i couldn't get any extension to do that so i created this script but the popup display html instead of the image in the page code.
I also tried to get the image directly, but its couldn't display it.

All i want to achieve is for an image to popup when page loads.

Kind regards.