The <browser> element is used to specify that the IMF application should
open in a new browser window without navigation tools. Although this works, it
is not as effective as using JavaScript from a page with a link to the IMF application
to do the same thing. Developers are discouraged from using this element. See
an example of how to do it with JavaScript at the end of this page.
| Frequency |
Parent Elements (the <browser> element is valid within): |
|
POS1 |
<site-config> |
| |
|
|
| Frequency |
Description (in this context) |
|
POS1 |
The <browser> element may appear once in the <site-config>
element in the specified sequence.
|
| |
|
|
|
Attributes |
Description |
|
title |
A title for the browser. Optional, defaults to "Internet Mapping Framework".
|
|
toolbar |
A boolean value indicating whether the application should open a browser
window with toolbars or not. Valid values are "true" or "false". Optional, defaults
to "true".
|
| |
|
|
Example:
<browser title="My Interactive Mapping Application"/>
A better approach to using the toolbar attribute of this element might be to
open the IMF in a separate window without toolbars from a link on an
introduction page. The following is an example of how to do that.
<script language="JavaScript">
function openMap(url) {
var w = 800;
var h = 600;
if (window.screen) {
w = screen.width * 0.9;
h = screen.height * 0.8;
}
if (w > 1024) w = 1024;
if (h > 768) h = 768;
var temp = "left=0,top=0,directories=0,fullscreen=0," +
"screenx=0,screeny=0,toolbar=0,location=0," +
"resizable=1,status=1,scrollbars=1," +
"height=" + h + ",width=" + w;
var win = window.open("","imfMap",temp);
win.focus();
win.location.href = url;
}
</script>
<a href="JavaScript:openMap('http://yourserver.com/imf/imf.jsp?site=foo')">Open Map</a>