Today I discovered Data Visualization with JavaScript. I would like to read that one, I will see if I ever find the time.
Tag Archives: javascript
Moment.js in maintenance mode
Today I read that Moment.js is now in maintenance mode…
Javascript Generators, Meet XPath
Today I read Javascript Generators, Meet XPath which was awesome.
Plain JavaScript can do a lot!
Today I saw on r/programming a post by Julia Evans titled A little bit of plain JavaScript can do a lot. She discusses some of JavaScript’s more powerful contemporary features.
If Apache2 won’t serve your JavaScript file try…
I had an issue with Apache2 improperly serving a JavaScript file which I seem to have fixed by making sure the file was terminated with a new-line character… this was really hard to diagnose and resolve! The behaviour in Firefox was that the file just didn’t finish to download, whereas the Apache2 logs indicated a 200 result… I think it may have had something to do with automatic compression, which is a dark art that I do not understand (mumbles something about mod deflate…).
Native HTML5 Drag and Drop
Found an article on Native HTML5 Drag and Drop…
window.resizeTo( … )
See here:
- You can’t resize a window or tab that wasn’t created by window.open.
- You can’t resize a window or tab when it’s in a window with more than one tab.
- Also, even if you create window by window.open(…) it is not resizable by default …see 4.
- To make window created by window.open() resizable, you must open it with resizable feature
myExternalWindow = window.open("http://example.com", "myWindowName", "resizable"); myExternalWindow.resizeTo(500,500); //resize window to 500x500
HTML glow effects
Found some cool glow effects. Couldn’t actually get them to work in my context, but it’s the thought that counts.
Passing selected value into HTML select onchange handler
So you have a <select> element and you want to call a handler, but you need to pass the selected value to the handler because you have multiple instances of the same <select> and can’t access them by ID (because there is many, one of which will have the new selected value, but you don’t know which). The solution is to pass in the newly selected value, like this:
<select onchange='handle_change( this.value )'>
Easy-peasy!
Multiline strings in JavaScript
Read an interesting article about multiline strings in JavaScript over on Stack Overflow, which referenced the Google JavaScript Style Guide which I thought was interesting.