Drawing nice shapes with JavaScript
Monday, July 7th, 2008It is amazing what you can do with JavaScript:
http://azarask.in/blog/post/contextfreejs-algorithm-ink-making-art-with-javascript/
Everthing I have found that might be useful in .NET, C#, SQL Server 2005, PHP and Actionscript 2.0 / 3.0 etc
It is amazing what you can do with JavaScript:
http://azarask.in/blog/post/contextfreejs-algorithm-ink-making-art-with-javascript/
The Insertion object has been deprecated, so when you used to do this:
new Insertion.After($('element'), '<p>jibble</p>');
You now do:
$("items").insert({ after: new Element("p") }); $("items").insert({ top: "<li>an item</li>" }); $("items").insert("<li>another item</li>"); // defaults to bottom
See here for more info:
http://www.prototypejs.org/2007/8/15/prototype-1-6-0-release-candidate
for (var member in object) {
alert(’Name: ‘ + member);
alert(’Value: ‘ + object[member]);
}
I need to perform many tests in one go one a few of my sites - so setting up a test suite with selenium
http://www.jamesnetherton.com/blog/index.cfm/2007/7/2/Creating-a-Selenium-test-suite
The Firefox plugin JavaScipt plugin by Venkman; yet another tool to learn - this was useful:
http://svendtofte.com/code/learning_venkman/venkmanwindows.php
Yes yes as expected I know. If you are passing name value pairs such as jibble=bibblebobble and yo uwant multiple values such as jibble=bibblebobble&flibble=nibblenobbol you don;t want the first value to have an ‘&’ in it so use the JavaScript function escape().
Simple I know but an easy one to miss! Hooray for testers!
Once again IE is being a pain. I am using prototype and making an ajax request. The response is just some JSON in the headers but no content. This is fine in Firefox but not so in IE. In IE it raises the onFailure event and gives the status of 1223.
It turns out that IE cannot handle blank content sent back from an AJAX request. Simple solution was to just give it some content back too!
This bug from dojo was useful:
http://trac.dojotoolkit.org/ticket/2418
This is technically an IE bug, but since it’s extremely unlikely that the agile giant will actually fix it I’m posting it here.
Sometimes IE translates HTTP 204 (No Content) into its own internal Status Code 1223. This causes BrowserIO to indicate an error condition in the response.
Status Code 1223 appears to be related to user-cancellation of requests. It appears on MSDN related to canceled Shutdown requests.