This site is under maintenance. Some links may stop working, I will try to fix them ASAP. Sorry!
See my DrawingsRead my MumblingsCheck my WallpapersView my web.designsTake a look at my GraphicsLearn with my Tutorials

Here is HomeNews in PortugueseVisit my Links

drawings : renewal


Lombergar.com
pixel.colos
deviantART
ghostbone
Vincent Low
niklasp.com
Alfdesign
Jams Arts
Joylee.net
phirebrush


Want to link us?

Tutorial type : DHTML/JAVASCRIPT
Views : 2538

link killer!
The next tip is a very useful one, specially if you use alot of Javascript to improve your site's navigation and is a trick that is pretty stupid if used alone, but that can have advantages if used along with some very simple javascript.

And here's what I'm talking about, the dead link. Try clicking that link and you'll notice that, instead of taking you to the index page, it does nothing at all.

Now, you should be wondering why would you possibly want to commit such an horrible crime?! The answer is actually quite simple: Imagine you want to open a new window with a certain size and no toolbars whatsoever. With a normal link, that is impossible (AFAIK), but there's a Javascript function that does it for you:
window.open("URL","name","attributes");
For instance, try this link, which will open a new window, with a width of 300 pixels and a 450 pixels height, with no toolbars, no scrollbars and not resizable. Here's how it's done:

<a href="#" onClick="window.open('promotion.shtml','_blank','width=300,height=480'); return false;">link</a>

I advise you to write something in the href field though, as in older browsers, the link won't be displayed if you don't. I usually use the # symbol, but you can use anything, as the link itself is dead.

But that's not the only possibility, you can do virtually anything with this... If you open that window again, for instance, you'll see 3 "dead links" that call 3 different functions that I've coded!

One last thing, there are more events that you can "kill", like the onSubmit for forms, if you don't want a form do behave as it would, but instead do something else, like handling the form info and behave accordingly..

Just learn some Javascript, which is a very simple language, and you'll see how useful this can be... This is probably the trick that I've used the most until this day!


5946 days online | hosted by TSOhost (recommended!)
copyright © 2002 - 2018  | Share the links, not the content

Aqui fica uma compilação de todos os MP3's encontrados desse grande sócio, o caríssimo . . . Zé Dread. Ze Dread - Compilacao.zip (mp3's - 11,35 MB) || Ze Dread - Compilacao.nfo (informações) Saca lá essa cena... Para quem usa eMule, aqui ficam os ed2k links: Ze Dread - Compilacao.zip || Ze Dread - Compilacao.nfo Aqui fica uma compilação de todos os MP3's encontrados desse grande sócio, o caríssimo . . . Zé Dread. Ze Dread - Compilacao.zip (mp3's - 11,35 MB)