Прошу объяснить, почему не работает:
<html>
<head>
<title></title>
<script language="JavaScript" type="text/javascript">
function OpenWin() {
windop = window.open("", "_self");
with (windop.document) {
open() ;
write('<html><head><title></title></head>'
+'<script src="ht'+'tp://api-maps.yandex.ru/1.1.1/index.xml? key=ABUoEEoBAAAA0TzVVAMAO XWN83ijIY_MGLwARJqWhFV462 AAAAAAAAAAAAAxlrdsxFy48rI 7bw0dbSPa2AWAjA==" type="text/javascript"><\/sc'+'ript>'
+'<body>'
+'<input id="Button1" onclick="OpenMap()" type="button" value="Open"/>'
+'<div id="eMap" style="overflow: auto; height: 100%;"></div>'
+'</body>'
+'<script language="JavaScript">'+'function OpenMap(){map=new YMaps.Map(document.getElementById("eMap")) ;}<\/sc' + 'ript>'
+'</html>');
close() ;
}
}
</script>
</head>
<body onload="OpenWin()">
</body>
</html
Ошибка возникает при
map=new YMaps.Map(document.getElementById("eMap"))