2007-12-25

Panorama download progress

One thing difficult to do with javascript panorama is the download progress counter. For example, when you try java panoramas - on the bottom of the panorama there is a progress bar saying that 1%, 2%, 3%, ... 10% ... 20% ... 50% ... 99% ... of the image is downloaded.

With javascript that's impossible to do. But, after thinking (hard) about it, i decided to replace the loading.gif image (loading.gif) with the "compressed" thumbnail of the panorama. Now you can see how big is the part already downloaded in your local browser's memory:
loading panorama loading panorama
But, there is one drawback; now the map will be displayed only after the panorama is downloaded and displayed.

I tried it with Firefox, Opera, and IE6. Try it here.

2007-12-24

Panorama stars

Besides the new layout, there is one new feature. Now all panorama can be rated - just click on stars below the map:



From one IP address is possible to vote only once per panorama.

See it in action:

New layout

mi3dot.org is a croatian web development comunity portal. I asked on their forum what they think about panoye and they responded me something like "It's OK... But you need a better design!". Well... OK... I tried hard, and the result is here:



Since I'm a programmer - my web-design skills are very mediocre. So, I know, it could have been better, but... I will leave that for future plans ;)

BTW, just for the archive, the old layout:


2007-12-21

Why I hate IE

I simply can't understand why is it that this don't work...
var Utils = new Object();
Utils.byId = function( id ) {
if( document.all ) {
return document.all[ id ];
}
return document.getElementById( id );
}
It is just a utility function which returns me an element by its id attribute. Nothing special. But then... There is a line saying:
panorama = Utils.byId( "panorama" );
It works. Well, it worked in Firefox and Opera. But in IE, there was an error saying something like: object doesn't have that property... I can't remember now (I'm on my Ubuntu linux PC now). It took me half an hour of experiments before I found the error. The error was the word var. The line:
var panorama = Utils.byId( "panorama" );
don't work without the "var".

When I was studying Javascript, in the manual it was said that if I use var for declaring variables -- they were local variables. Without var they are global variables. Since panorama in my javascript is a global variable, I decided to delete the "var". But IE didn't like it.

Why?