Insert code snippet fails in Firefox

Last post 11-04-2009, 10:46 AM by Adam. 1 replies.
Sort Posts: Previous Next
  •  11-04-2009, 9:07 AM 56906

    Insert code snippet fails in Firefox

    Hi,
     
    I have added the following piece of code in the "code snippet" dropdownlist to be inserted:
     
    1. <script src='http://maps.google.com/maps?file=api&amp;v=2.x&amp;key=xxx'  
    2. type='text/javascript'></script><script   
    3. type='text/javascript'>   
    4.           var map = null;   
    5.           var geocoder = null;   
    6.            function initialize() {   
    7.             if (GBrowserIsCompatible()) {   
    8.               map   
    9. new GMap2(document.getElementById('map_canvas26'));map.addControl(new  
    10. GLargeMapControl());geocoder = new GClientGeocoder();   
    11.               showAddress('address');   
    12.             }   
    13.           }   
    14.            function showAddress(address) {   
    15.             if (geocoder) {   
    16.               geocoder.getLatLng(   
    17.                 address,   
    18.                 function(point) {   
    19.                   if (!point) {   
    20.                     alert(address + ' not found');   
    21.                   } else {   
    22.                     map.setCenter(point, 13);var marker = new GMarker(point);   
    23.                         map.addOverlay(marker);marker.openInfoWindowHtml(address);}   
    24.                 }   
    25.               );   
    26.             }   
    27.           }   
    28.           window.onload = initialize;   
    29.           window.onunload = GUnload;   
    30. </script><div style="background-color: #989898; width: 500px; height: 300px;" id="map_canvas26"></div>  

    In IE8 this works ok, but in Firefox it inserts everything except for the last div...
  •  11-04-2009, 10:46 AM 56909 in reply to 56906

    Re: Insert code snippet fails in Firefox

View as RSS news feed in XML