Well, it's possible to do all kind of fun stuff, it's just, the more fun something is, the less likely it is to work. Javascript is a very simple little tool, you can do various things with it from opening new windows like this...
A very large number of people have Javascript capable browsers however there are those who either aren't able to see anything in Javascript or they choose not to, therefore to reach the maximum number of people it's best to keep it down to an absolute minimum. The best solution in most cases is to replace this client-side scripting with a server-side alternative, PERL is probably the most common language for this however PHP usage is growing rapidly. So why do so many people use Javascript? Well, server-side scripting often involves a little more work, whereas client-side scripting is easier to just write and forget about, if it works once then it's the users fault if it doesn't work for them.
Of course the big companies try to make life easier for us all. A couple of years
ago there was a huge craze for people to write simple Javascript so that text scrolled
across the page, Microsoft tapped into this with the <MARQUEE> tag, unfortunately
though it means it only works in Microsoft browsers, which although in the majority
are not on every computer.
That means that if you're looking at this in a Microsoft browser then...
However they were not the
first to offer us such gifts, Netscape had already given us the <BLINK> tag,
which does nothing if you're using anything but a Netscape browser, but as the name
suggests, in some of Netscape's older products it'll make at you
It's fairly easy to write code that will detect what a browser can do, so these toys can be used quite safely, especially as these two I've just mentioned are just ignored if the browser doesn't understand them, giving you plain and simple text.
However you can go much further, for example Microsoft offer you the chance to decide what happens when a user presses the F1 key, this usually brings up the help file for what ever program the user is using, which will always be Internet Explorer because of how it works. Personally I feel this is only of use in Intranets, however if you're confident that all your user will be using IE and that it'll help them, why not? The key to it all is trying not to scare off users, you can do some of these things quite confidently, providing you allow an alternative.