priligy tablets buy priligy online dapoxetine purchase priligy pills dapoxetine tablets dapoxetine 60mg buy dapoxetine priligy online priligy 30mg priligy 30 mg dapoxetine 30mg dapoxetine priligy priligy 60 mg where can i buy dapoxetine dapoxetine dosage dapoxetine online priligy online pharmacy priligy uk buy dapoxetine online priligy dosage generic priligy priligy results buy priligy tablets dapoxetine price dapoxetine online pharmacy priligy dapoxetine buy where can i buy priligy dapoxetine pills where to buy priligy dapoxetine 30 priligy prescription buy dapoxetine 60mg priligy medicine dapoxetine online purchase priligy price buy priligy dapoxetine online priligy dapoxetine 30mg order priligy online where to buy dapoxetine priligy 30mg tablets dapoxetine uk where can i get priligy dapoxetine generic priligy effectiveness priligy 60 mg tablets dapoxetine 60 mg online priligy without prescription order priligy dapoxetine tablets 60 mg dapoxetine prescription where to get dapoxetine priligy dapoxetine 60mg dapoxetine drug viagra with dapoxetine dapoxetine 30 mg tablet priligy 60 mg price priligy pharmacy dapoxetine for sale priligy tabletes dapoxetine sildenafil where to get priligy priligy tablets uk dapoxetine effects order dapoxetine does priligy work dapoxetine order online dapoxetine alternative dapoxetine tablets price where to buy dapoxetine online cialis with dapoxetine dapoxetine tablets 30 mg dapoxetine tablets online sildenafil and dapoxetine priligy and viagra priligy drug priligy 30mg price priligy for sale priligy tab 30mg tadalafil dapoxetine dapoxetin bestellen premature ejeculation tablets priligy 60mg dapoxetine and sildenafil tablets priligy cost dapoxetine and sildenafil dapoxetine poxet 60 buy priligy cheap dapoxetine 30mg buy online priligy dapoxetina dapoxetine combination dapoxetine 90mg priligy 60 dapoxetine and viagra dapoxetin 60mg priligy pills for sale dapoxetine best price cheap priligy cialis and dapoxetine tadalafil and dapoxetine how to use dapoxetine priligy canada viagra and priligy dapoxetine usa cialis dapoxetine priligy and cialis together viagra dapoxetine dapoxetine pills for sale priligy and viagra combination generic priligy online priligy in usa sildenafil with dapoxetine cialis with dapoxetine review stop premature ejeculation priligy viagra dapoxetine and viagra together buy dapoxetine cheap priligy review uk buy generic priligy online how long does priligy last cialis last longer dapoxetine canada what is priligy priligy tablets review can you take priligy with viagra cialis plus dapoxetine dapoxetine and cialis together sildenafil dapoxetine combination priligy and viagra together dapoxetine and cialis tadalafil with dapoxetine online cialis priligy what is dapoxetine buy cheap priligy online can i take priligy with viagra generic dapoxetine online sildenafil dapoxetine tablets sildenafil and dapoxetine combination how to take priligy cialis and priligy together does dapoxetine work how to use dapoxetine tablets tadalafil dapoxetine combination dapoxetine 60 priligy combined with cialis tadalafil dapoxetine tablets cheap dapoxetine how to use dapoxetine and sildenafil tablets viagra priligy priligy usa do you need a prescription for priligy dapoxetine sildenafil combination priligy how long does it last what is dapoxetine and sildenafil tablets priligy cheap tadalafil and dapoxetine tablets sildenafil plus dapoxetine dapoxy 60 can priligy be taken with cialis dapoxetine and tadalafil dapoxetina 30mg dapoxetine for sale online dapoxetine vs viagra dapoxy 60 mg priligy 30 mg or 60 mg priligy cialis together priligy canada pharmacy sildenafil with 30mg of dapoxetine dapoxetin tablete can you take dapoxetine with viagra dapoxetine with sildenafil dapoxetine tadalafil combination dapoxetine and sildenafil tablets dosage dapoxetine and sildenafil combination tadalafil plus dapoxetine how to get priligy dapoxetine half life dapoxetine canadian pharmacy how long does priligy last for priligy dose priligy original dapoxetine sildenafil tablets ever long tablet benefits dapoxetin priligy last longer deutsch everlong dapoxetine original priligy online priligy buy online canada dapoxetine plus sildenafil sildenafil dapoxetine dosage does dapoxetine really work dapoxetine and sildenafil tab priligy canada where to buy priligy 30 mg 3 tablet priligy in canada priligy united states dapoxetine and sildenafil tablet HDD Killers » Six JavaScript Features

HDD Killers

Six JavaScript Features

Posted on Thursday 24 November 2005

I just read the blogs I link to in my sidebar, all good stuff I can assure you, however I would like to make particular mention of a site that isn’t on the list called “Wait till I come!” that was linked to on Jona’s site. I found something rather troubling on that site, and it wasn’t just that he spelt the title wrong (it’s ’til, not till!). It was a particular blog entry called “Six JavaScript features we do not need any longer”.

I’ll start off by saying that out of all of his points, I agree with the first and second and semi-agree with the fifth and sixth. I think it’s best if I run through them all individually and explain my reasoning.

  1. document.write – Like I said, I agree with him here. The DOM can be used to add in content in anywhere on the page so there’s no need for document.write.

  2. <noscript></noscript> – Here I also agree, it’s easy enough to manipulate the existing content with JavaScript if you want it to be displayed in a different way or (for some reason) not displayed at all, therefore there is no need for <noscript>.

  3. href="javascript: …", onclick="javascript:" – I’d like to clear up here that there is no need for javascript: in the onclick event handler, but there IS a valid use for javascript: in the href. It’s called a bookmarklet and bookmarklets can be very useful. A bookmarklet is basically a one-line JavaScript that you can store as a bookmark and then run it on any page. For example, if you really like the font Georgia, you could bookmark the following link, and then activate it on any page that you like.

    Bookmark for Georgia.

    Clicking on it will just run the JavaScript on the current page, but bookmarking it will allow you to run the code on any page. Obviously it won’t work for browsers with JavaScript disabled or not supported, so perhaps the link ought to be created with JavaScript in the first place, but it will still require the javascript: to appear in the href attribute of the link.

  4. onclick=”void(0)” – This follows on nicely from the last point, because in the bookmarklet link I actually USED void(0);. If I didn’t use void(0); then it wouldn’t work, in the case of that bookmarklet, you would be taken to a page that simply said Georgia on it. Using return false as a substitute for void(0); will simply cause a script error. However, in event handlers, return false should always be used instead of void(0);, the only valid use for void(0); is in the href after a bookmarklet.

  5. document.all , document.layers, navigator.userAgent – Here I semi-agree, document.all and document.layers is used by some people to check for ye olde IE DOM and Netscape DOM, if(document.all){ some IE code }. However, Firefox will now return true to document.all and will try and execute the IE code (and fail). Apart from that, there’s no excuse for not using the W3C DOM and then letting the older browsers fall back on the non-JavaScript support that your site should have anyway.

    On the other hand, navigator.userAgent is still useful in stat tracking. The stat tracking software that I use (Mint) collects user agent information with JavaScript in order to differentiate between browsers and web crawlers. It’s not perfect as not everyone has JavaScript enabled, and in my opinion it would be better to collect as much information as possible on the server-side, but that’s the way it is so I guess it still has a use.

  6. onmouseover="myCall('I','pity','the','foo',1233,'I aint going on no plane')" – Semi-agreeing again, I would like to remind you of the reasoning as to why this is bad.

    Anything crucial to the user experience that you generate via JavaScript needs to be in the document anyways – for users without JavaScript. Reusing this markup is a lot easier, cleaner and more maintainable than sending a lot of parameters. If there is any reason to send parameters, a simple “this” does the trick in most of the cases, as you can navigate through the DOM from there.

    Well the first sentence is definately true and I agree completely with that part of it. However sometimes it is necessary to provide a few “hooks” for the JavaScript to work with, in which case you are not creating some extra content, but perhaps you have hidden a section of content with JavaScript and now need to reveal it onmouseover, in which case you may need to pass the ID of the element you wish to reveal to the function. It needn’t be onmouseover though, it could be onclick or onblur.

    A lot of the time it’s true that using the “this” keyword is enough, I use it myself quite a lot, but sometimes it’s just not enough, and in those situations passing a few extra parameters to a function isn’t wrong. The only time it is wrong is when you are supply extra content that would be relevent to users without JavaScript.

Anyway, that’s enough about webdevelopment now. A quick summary of what else has happened since I last blogged. I found out that to download the Windows Server 2003 image I had to submit all of my TOTALLY GENUINE details again, then add the image to my shopping cart, then click next a lot of times and wait for some painfully slow loading pages to load, then I got an email with a link in it to a download and also an activation code. After all that kerfuffle I finally have the image on my PC and need only to burn it to disc.

I also played on Doom 3 earlier, and actually finished it. Finally, after over a year I finally got round to completing it. I always got bored after playing for so long, but this afternoon I started playing again and battled all the way through to the end, w00t for me.

I wrote this entire blog entry before I even had a title, seriously. I’m still writing and I haven’t even got a slight idea what the title might be.


  1.  
    Thursday 24th November 2005 | 10:49 pm
     
    Jonathan Fenocchi's Globally Recognised Avatar

    I think that document.write() and still have some practical uses, but 99% of the time they are a bad choice. Other than that, I agree with your agree/disagree statements.

    Oh yeah, and it’s proper to use “till” instead of “’til.” From http://www.answers.com/till

    USAGE NOTE Till and until are generally interchangeable in both writing and speech, though as the first word in a sentence until is usually preferred: Until you get that paper written, don’t even think about going to the movies.•Till is actually the older word, with until having been formed by the addition to it of the prefix un–, meaning “up to.” In the 18th century the spelling ’till became fashionable, as if till were a shortened form of until. Although ’till is now nonstandard, ’til is sometimes used in this way and is considered acceptable, though it is etymologically incorrect.

  2.  
    Friday 25th November 2005 | 2:19 am
     
    David's Globally Recognised Avatar

    Hmm, didn’t know that. The only uses for the word till that I knew were to mean cash register and ploughing.

    Yeah, I guess it can be handy to use document.write somtimes, such as using it to write out a bookmarklet link. document.write can be replaced with a bit of DOM though, and yeah It involves some slightly longer code, but it works with application/xhtml+xml.

  3.  
    Friday 25th November 2005 | 10:11 pm
     
    lilcrazyfuzzy's Globally Recognised Avatar

    Hmm, didn’t know that. The only uses for the word till that I knew were to mean cash register and ploughing.
    must be an american thing :p

    btw, did you see, did you see? i got my gravatar (after a whole week!)

  4.  
    Ben Rogers
    Saturday 26th November 2005 | 3:23 am
     
    Ben Rogers's Globally Recognised Avatar

    No you didn’t, fuzz, it’s still absent.

  5.  
    Saturday 26th November 2005 | 4:32 am
     
    Robert F.'s Globally Recognised Avatar

    Hey, you can put “Till” on us. It’s from Middle English, us Americans brought it with us from England. Don’t try to excuse your ignorance. 😛

    I agree with you David on all your points. What’s wrong with javscript: as a URL protocol? The data: protocol is a standard, but technically it’s not linking to a document, as it is the document. Same idea with the javascript: protocol.

  6.  
    josh
    Tuesday 31st July 2007 | 7:41 pm
     
    josh's Globally Recognised Avatar

    “#
    – Here I also agree, it’s easy enough to manipulate the existing content with JavaScript if you want it to be displayed in a different way or (for some reason) not displayed at all, therefore there is no need for .
    #”

    I disagree. The reason to use is so that browsers without javascript (enabled) can render the content you would want to be rendered only in that scenario.
    I don’t understand how otherwise manipulating the content with javascript is going to work if javascript itself doesn’t.

  7.  
    Thursday 20th September 2007 | 4:52 pm
     
    David's Globally Recognised Avatar

    I don’t think you understood me Josh. I was saying, make the page look like how you want for people without JavaScript, then for those with JavaScript, modify what’s there to look like how you want it to look for those with JavaScript. By doing it that way, noscript is not needed.

Sorry, the comment form is closed at this time.