Which code segment should you use?

You are creating a Virtual Earth 6.0 application to be viewed by using Microsoft Internet Explorer. The Web pages of the application contain maps.

The head section of the Web pages contains the following code fragment.

<script type=”text/javascript”>
var map = null;
function GetMap(){
map = new VEMap(‘Map’);
map.LoadMap();
ResizeMap();
}
</script> <style type=”text/css”>
html, body{ overflow:hidden; }
</style>

The body section of the Web pages contains the following code fragment.

<body onload=”GetMap();”>
<div id=’Map’ style=”position:relative; width:400px;
height:400px;”></div>
</body>
You need to resize the maps on the Web pages so that they exactly fit into the dimensions of the available browser area.

Which code segment should you use?

You are creating a Virtual Earth 6.0 application to be viewed by using Microsoft Internet Explorer. The Web pages of the application contain maps.

The head section of the Web pages contains the following code fragment.

<script type=”text/javascript”>
var map = null;
function GetMap(){
map = new VEMap(‘Map’);
map.LoadMap();
ResizeMap();
}
</script> <style type=”text/css”>
html, body{ overflow:hidden; }
</style>

The body section of the Web pages contains the following code fragment.

<body onload=”GetMap();”>
<div id=’Map’ style=”position:relative; width:400px;
height:400px;”></div>
</body>
You need to resize the maps on the Web pages so that they exactly fit into the dimensions of the available browser area.

Which code segment should you use?

A.
function ResizeMap(){ document.getElementById(‘Map’).style.width = “100%”; document.getElementById(‘Map’).style.height = “100%”; }

B.
function ResizeMap(){ document.getElementById(‘Map’).style.width = screen.availWidth;
document.getElementById(‘Map’).style.height = screen.availHeight; }

C.
function ResizeMap(){ var height = screen.height; var width = screen.width; map.Resize(width, height); }

D.
function ResizeMap(){ var height = document.body.offsetHeight; var width = document.body.offsetWidth; map.Resize(width, height); }



Leave a Reply 0

Your email address will not be published. Required fields are marked *