Category Archives: Javascript

Javascript – String als Funktion ausführen

      Kommentare deaktiviert für Javascript – String als Funktion ausführen

function googleMapsApi() { scope = null; this.loadGoogleMapsApi = function (callback) { if (typeof(google) !== ‚undefined‘ && typeof(google.maps) !== ‚undefined‘) { // trick to execute the callback as a function window[scope][callback](); return; } var script = document.createElement(„script“); script.type = „text/javascript“; script.src = „http://maps.google.com/maps/api/js?sensor=false&callback=“ + scope + „.“ + callback; document.body.appendChild(script); }… Read more »