Hi Telerik,
I have two tabs, one tab displays some information and a tab to load GoogleMapAPI.
When run the program I set SelectedIndex is Tab1, then press into Tab2, the GoogleMapAPI in Tab2 will display error on Firefox (3.6+) and Chrome (9+). It's ok on IE 8
Please view my code below
I have two tabs, one tab displays some information and a tab to load GoogleMapAPI.
When run the program I set SelectedIndex is Tab1, then press into Tab2, the GoogleMapAPI in Tab2 will display error on Firefox (3.6+) and Chrome (9+). It's ok on IE 8
Please view my code below
<telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1" SelectedIndex="0"> <Tabs> <telerik:RadTab Text="Some Infomations"> </telerik:RadTab> <telerik:RadTab Text="Google Map API"> </telerik:RadTab> </Tabs></telerik:RadTabStrip><telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0"> <telerik:RadPageView ID="RadPageView1" runat="server"> Some Infomations </telerik:RadPageView> <telerik:RadPageView ID="RadPageView2" runat="server"> Google Map API <br /> <br /> <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> <script type="text/javascript"> /* Google Map API v3 */ // khoi tao map function loadScript() { var script = document.createElement("script"); script.type = "text/javascript"; document.body.appendChild(script); } window.onload = loadScript; // initialize function initialize() { var latLng = new google.maps.LatLng(21.042324102802453, 105.77579302215577); // geocoder init var geocoder = new google.maps.Geocoder(); // map options var myOptions = { zoom: 13, center: latLng, mapTypeId: google.maps.MapTypeId.ROADMAP } // init map var map = new google.maps.Map(document.getElementById('map_canvas'), myOptions); // create marker var marker = new google.maps.Marker({ position: latLng, map: map, draggable: true }); } /* END Google Map API v3 */ </script> <div id="map_canvas" style="width: 600px; height: 400px; margin-left: 40px;" /> </telerik:RadScriptBlock> </telerik:RadPageView></telerik:RadMultiPage>