garry27 Posted November 26, 2006 Share Posted November 26, 2006 how do you output a jscript var to the browser in a jscript script? Link to comment https://forums.phpfreaks.com/topic/28563-output-to-browser/ Share on other sites More sharing options...
garry27 Posted November 27, 2006 Author Share Posted November 27, 2006 i've tried using document.write in this loop like this:[code]for(i in points) { var point = new GLatLng(points[i].lat, points[i].lng); var pubName = points[i].name; if (points[i].streetNo == 0) { points[i].streetNo = ''; } if (points[i].phone == 0) { points[i].phone = ''; } var pubAddress = points[i].streetNo + ' ' + points[i].street + ' ' + points[i].city + '<br/>' + ' ' + points[i].county + ' ' + points[i].postcode + '<br/>' + points[i].phone; var marker = createMarker(point, pubName, pubAddress); var pubPostcode = points[i].postcode; document.write.(pubPostcode); document.write.(pubName); map.addOverlay(marker); }[/code]but it returns an error. is there a work around for it? ??? Link to comment https://forums.phpfreaks.com/topic/28563-output-to-browser/#findComment-130819 Share on other sites More sharing options...
fenway Posted November 27, 2006 Share Posted November 27, 2006 Remove that extra period after write. Link to comment https://forums.phpfreaks.com/topic/28563-output-to-browser/#findComment-131009 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.