Archive for the 'JavaScript' Category

The Experiment

December 23rd, 2006 by qemm

It seems to be a rule that I am damned by constant crazy ideas popping into my head. Most of the time those are of the “white noise” category. However, some occasional idea triggers a spontaneous — as I call it — “3 hour challenge”, or “let’s see if I can do develop this interesting concept application in just 3 hours.”

It’s also a rule, that “3 hour challenges” almost always result in several days of actual work. Like it was with my latest experiment in AJAX - Image Search Slideshow. It’s a very basic idea - run a search against Google Image Search and display full result images as a slideshow. Basic functionality took 3 hours. Additional bells and whistles — navigation, optimization, Yahoo and live.com support — took another 30.

So here comes the ultimate image search engine for those special occasions when your hands absolutely positively have something better to do than keyclicking ;)

http://slideshow.zmpgroup.com/

Oh and by the way, I honestly don’t recommend running a search for “playmate” on Google Images. And since you’re not gonna listen to me anyway, here comes “I warned you” in advance: I warned you!

JavaScript Crashing Opera

December 13th, 2006 by ailon

Some time ago I wrote that I can crash Firefox with Javascript. Unfortunatelly I wasn’t able to build a simple test case to reproduce this to submit it as a bug.

This time I crashed Opera and now I can reproduce it with a simple script so I submitted a bug report. I’ve tried it on several Windows XP machines running Opera 9.02 or 9.00 and all of them crashed. In case you have some other Opera version or the latest version running on other OS you can try if this bug affects your browser (and let me or Opera know). To do this click here, press “Open popup” button and “Insert stuff” button in the popup. Keep in mind that your Opera will most likely crash so don’t do this in a browser with important tabs open.

As far as I understand the source of the problem is that I create image object in one document and try to insert it in the other document while closing the document in which that object was created.

Update: newly released Opera 9.1.0 still crashes.

Honey, I Can Crash Firefox With JavaScript!

November 18th, 2006 by ailon

While developing SPAW v.2 I’ve managed to write some JavaScript code that crashes Firefox (both 1.5 and 2.0) with 100% probability. I would like to submit the bug to bugzilla but I can’t reproduce it in a simple test script and submitting the whole SPAW v.2 code would be a little to much.

event.preventDefault()

November 8th, 2006 by ailon

I was struggling for quite some time trying to prevent Firefox from dragging an image when I wanted to use it as a resizing grip. I was trying to cancel default event using event.preventDefault() method in onmousemove event with no success. Thanks to Michael Foster (from cross-browser.com) at SitePoint forums I now know that it’s onmousedown event where I should’ve canceled the default (dragging) behavior.

Object-Oriented JavaScript

October 26th, 2006 by ailon

OOP in JavaScript is something not so obvious to normal people. I mean if you know the basics of OOP in Java, C# or C++ this doesn’t help you alot in JavaScript. When I started development of SPAW2 (actually when I started thinking about it) I’ve read some articles on object-oriented JavaScript and the one that gave me a quick and understandable idea about all of this was the article called JavaScript Object-Oriented Programming by Ryan Frishberg.

OOP Mumbo-Jumbo

October 20th, 2006 by ailon

For the past couple of years I’ve been developing in C# under .NET (most of the time) which is [almost] classic object-oriented programming. During that period I had to do some PHP4 development from time to time which is very simplistic and a little strange OOP. Now I’m working on SPAW 2 and do some JavaScript OOP which is even crazier. And at this moment I have to switch among the three a couple of times each day. I’m scared my brain is going to explo!%%^*

[Host is unreachable]