function render_measurement_stations(){ var mapplot={xlim:[],ylim:[]}; mapplot.xlim = [0,0]; mapplot.ylim = [0,0]; var measurementstations={name:[],hname:[],parameter:[],device:[],latitude:[],longitude:[],owner:[],public:[]}; var el = document.getElementById("svgframe"); // or other selector like querySelector() //console.log (el); var rect = el.getBoundingClientRect(); // get the bounding rectangle wf = ; hf = ; //console.log( rect.width ); //console.log( rect.height); //console.log( rect); //console.log(measurementstations.name); //document.getElementById("svgplotstations").innerHTML="" for (i=0; i< measurementstations.name.length; i++) { document.getElementById("svgplotstations").innerHTML +=""; document.getElementById("svgplotstations").innerHTML +=""+measurementstations.hname[i]+" "; } //alert($(document.getElementById("svgframe")).html()); console.log( $(document.getElementById("svgframe")).html()); }