Παρουσίαση με Ετικέτες

HowTo: round a number up to N decimal digits in Javascript
17 Ιουνίου 19 05:21 μμ | Μπιρμπίλης Γεώργιος | 0 σχόλια   
Was just trying to round-off some Google Maps coordinates for display in Javascript up to 3 decimal digits and that was a bit like a blast from the past (the end of the ‘90s to be more accurate)… So here’s my contributed answer at: https://stackoverflow.com/questions/2221167/javascript-formatting-a-rounded-number-to-n-decimals This works for rounding to N digits (if you just […]
Δημοσίευση στην κατηγορία: , , , , , , , , , , , , ,
HowTo: remove Javascript imports from OpenLayers map examples
11 Ιουνίου 19 09:31 μμ | Μπιρμπίλης Γεώργιος | 0 σχόλια   
OpenLayers is a fine alternative to the map visualization part of Google Maps Platform, however many of its examples sometimes use features from future and server-side Javascript versions, like “imports”. Based on lou’s answer at https://stackoverflow.com/questions/51093964/why-examples-dont-work-a-struggle-with-imports/56549364, here’s a fix I just did to make the Marker animation example work when you just copy-paste the example […]
Δημοσίευση στην κατηγορία: , , , , , , , , , ,
Gotcha: JS replace on document.location fails, use document location.href
20 Αυγούστου 14 03:17 μμ | Μπιρμπίλης Γεώργιος | 0 σχόλια   
This is my contribution to: http://stackoverflow.com/questions/2652816/what-is-the-difference-between-document-location-href-and-document-location Here is an example of the practical significance of the difference and how it can bite you if you don’t realize it (document.location being an object and document.location.href being a string): We use MonoX Social CMS (http://mono-software.com) free version at http://social.ClipFlair.net and we wanted to add the language bar […]
Δημοσίευση στην κατηγορία: , , , , , , , ,
Gotcha: must set document.location.hash only at end of page in Mozilla
07 Σεπτεμβρίου 13 11:35 μμ | Μπιρμπίλης Γεώργιος | 0 σχόλια   
I just came across a different behaviour between IE and Mozilla Firefox: scripts at the former seem to execute after the page has fully rendered, while the later they seem to execute when they’re met by the page parser or something like that. The HTML script tag has a defer attribute for running scripts after […]
Δημοσίευση στην κατηγορία: , , , , , , , , , , , , , , ,
Gotcha: var x = x() in Javascript gives “Object Expected” error
14 Ιουνίου 13 12:27 μμ | Μπιρμπίλης Γεώργιος | 0 σχόλια   
At ClipFlair Studio (a Silverlight app), I had some time ago implemented a confirmation warning upon user trying to close the webpage (when it was running inside the web browser), which then had stopped functioning. It seems at some refactoring I had added code like the following: var activityView = activityView(); and it was failing […]

Search

Go

Ιστορικό Δημοσιεύσεων

Συνδρομές