Archive for the ‘javascript’ Category

No more breaking code

Tuesday, November 21st, 2006

Dean Edwards strikes again. This time he solved a problem with extending built-in objects that tends to break other scripts. It seems this might be utterly useful.

In other news I’ll be giving a talk tomorrow in Cyberpipe about sorting in JavaScript, datagrids and a bit of AJAX to spice it all up.

Retrieving forgot passwords

Wednesday, November 8th, 2006

You know how you allow your browser to save passwords and then forget the master password and can’t see the passwords anymore? Or you own IE6 where you can’t even see what the darn thing saved?

When I was in a situation like this I wrote a simple favelet/bookmarklet that lets you steal your own passwords that are autofilled by the browser.

When run, the favelet will go through all the input fields that have type set to password (the ones you can’t see, cause the browser will mask the content to * or dots) and alert their name and value.

This kind of script, combined with XHR can be a powerful attack tool since you can use it to steal passwords of other people if you can slip it in the page they’re looking at. More about it on ajaxian. Don’t use this script for anything like that!

Web mashups – LIFFe

Monday, October 30th, 2006

A few days ago the local film festival LIFFe launched its programme. Again it was not an exceptional work of IA or UX. You can access the whole list of movies that leads to individual movie pages that contain details and the showing times. You can also check the schedule by individual date that unfortunately contains almost no details about the movie – just the title. Sections of the festival do not have a page where you can see all the movies that compete in that section.

So I decided to create a quick mashup of all scripts that have been lying around my disk for some time now. This proved to be a quite difficult task because of a lot of reasons. The first one was that the code behind the page is incredibly ugly – table layouts in table layouts without ids, classes or almost anything you can use to find your way around it. The next problem was the encoding and my use of php that is not too friendly to windows-1250 encoding used on the source page. Eventually I did it in a bit less than a day – it’s not perfect, but I think it shows that it can be done better and it does not take more time.

I have some stuff to add but since the festival is getting closer and closer I present Program 17. LIFFe festivala.

The page uses some AJAX (XHR to be exact), DOM parsing of the source data and SortedTable to present the data.

Triptracker

Saturday, October 28th, 2006

Spletne urice served its visitors a great talk from one of the founders of a Slovenian company called Klika. It’s primarily a software company that specializes in tracking software with GPS and then mapping the data to support sporting and other events (like the Ljubljana marathon that’s on tomorrow).

But the talk wasn’t about their programming but rather about the first global Slovenian Web2.0 website/service – the TripTracker. In short it’s a website that allows you to upload positional data along with pictures, matches them all up by time, draws a map and more or less creates the whole trip into a nice little presentation that you can use to show at meets or just send to your friends. It’s also a good resource for travelers that want to travel to places they know almost nothing about – you can check other people’s trips and see where they went and what they saw and see any comments they might have made.

The most fascinating thing about all this is that they created all their mapping data themselves – all the JavaScript and html for the mapping was written for this site exclusively and all the images converted from NASA sources (I hear Google has exclusive rights on HQ satellite photos so no other mapping service can use them). As the talk progressed questions were popping to my mind but were soon answered – the API is in progress, the service can use Flickr as the image resource and they might even switch their own mapping tool with Google Maps. One thing that came as a surprise is that they’re not using Microformats even though it clearly supports stuff they present on their site. They do allow export to KML though. As all true Web2.0 sites TripTracker also has a developer blog so check it out to see when they release the API to the public.

The slides will probably online soon.

xinf is not flash

Wednesday, October 18th, 2006

Spletne urice” started today with a talk from the lead developer and inventor of xinf Daniel P. Fischer. He talked about getting rid of flash by using it. The talk concentrated around xinf, an open development tool that shares a lot of goals with Flash but has a community driven open development.

The idea behind xinf is to create a new environment for creating rich media applications and then export them to different ‘platforms’. Currently available are javascript (in Firefox) and native (xinfinity). Export for Flash existed in a previous version and is also planned for this version. Xinf is LGPL and is based on many opensource solutions and libraries. The project is also looking for developers in various areas with the promise that Daniel will take you to his island when xinf is so huge that he’ll be able to afford it. You’ll probably get more insight when the presentation is online.

Related news:
Our local multimedia center Cyberpipe is hosting haip a multimedia festival of open technologies this week.

Another reason to hate AJAX

Wednesday, October 11th, 2006

Maybe I forgot to mention this in my talk about why I hate AJAX but this is a very good point against a lot of AJAX use. If I have to wait for the content I might as well see the whole screen redrawn – it’ll wake me up after the loading is done. If you’re able to guarantee an instant response do it, otherwise don’t. How would you feel about “suggests” that you can see 10 seconds after you typed something?

If you weren’t able to see me talk about AJAX – I hate it because so much of its use is just plain wrong and the perpetrators should have their clicking fingers broken and internet connection reduced to 2400bps.

Talking about talks – a new season of Spletne urice, weekly talks at the local multimedia center Cyberpipe is starting next week. I hope we’ll get some foreign speakers this year – we’re offering costs to cover the trip to lovely Slovenia and a limited number of hotel nights so you can see the countryside. If you have no idea where Slovenia is or what it’s like let me just point you to slovenia.info and tell you that you can see the mountains and the sea in just two hours.