I am trying to place the image in the middle of the screen but in IE
it's not working
here is my sample code.
function showMap(event, url, element)
{
var map_container = $('map_container'),
viewport = document.viewport.getDimensions(),
offset = $(element).viewportOffset(),
top = offset.top + getScrollTop() + $(element).getHeight() + 10,
image_mapgross = $('image_mapgross');
image_mapgross.onload = middleMap;
image_mapgross.src = url;
map_container.style.cssText = "display:block;left:10px;top:" + top + "px;";
Event.stop(event);
//Event.observe(map_container, 'click', stopEvent);
}
in IE
the function middleMap
is never called.
function middleMap() {
var map_container = $('map_container');
middle(map_container);
}