+ Start a Discussion

How to see content inside div tags in apex page?

Locationbox is an external system that services like google maps. I want to deploy it to sf. You can review an example here;



First script tag retrieves javascript code from locationbox service. After working startup(), it sets a dynamic content to <div id='map'...> in document. There are several png images in the dynamic content. The code below works locally as html files but it doesn't work in apex page. (the function x() works as expected.)


 I am using the following code in apex page.


<script language="Javascript" src="http://www.locationbox.com.tr/locationbox/services?Key=mykey&Cmd=API&Typ=JS"
<script language="JavaScript">
  var mapper  = new IMapper();

  window.addEventListener('load', function() {alert('OK1'); x();}, false);

  window.addEventListener('load', function() {alert('OK1'); startup();}, false);

  function startup() {
    mapper.initMap(41.1, 29.1, 7);
  function x() {
     document.getElementById("map").innerHTML = 2;
 <div id="map" style="border: 1px solid black; width:100%; height:100%; z-index: 0; position:relative; -moz-user-select:none;   background-color: lightgrey;" tabindex="0"> 1 </div>




Does anyone have any idea about this issue?