Page 1 of 2 12 Last
  • Jump to page:
    #1
  1. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Hmmmm


    I was reading the article. It was actually pretty good and I looked at the advertisment that appears on all the pages and I thought, "wow, that is pretty good use of javascript". It turned out to be flash application :-(

    Other than that, good article
    H
  2. #2
  3. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    JavaScript event model article


    Excellent article! I use JavaScript a lot
    and where possible have replaced server side scripting with it. I look forward to the next article.

    Phil Pearl

    p.s. Take a look at some interesting JavaScript at

    http://www.browseredit.com/Sample.html
  4. #3
  5. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: JavaScript event model article


    Wonderful article! This was exactly what I was looking for... Please include more examples of using Javascript in your next article too..
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Location
    Winnipeg, Canada
    Posts
    4
    Rep Power
    0

    Re: JavaScript event model article


    >>>where possible have replaced server side scripting with<<<

    Just my opinion here, but 'replacing' server side code with Javascript may not be the best idea.

    Just using validation as an example. If you take out any server side validation and only use JS, what happens when a user with a browser that doesn't support JS visits? Or, even more probable, what if a user with a browser that does support JS has it disabled for some reason?

    I always make sure I have server side validation, and then I can think about JS. I always view JS as a supplement, but never a replacement for server side stuff.

    Just my opinion....

    Cheers,
    Tao.
  8. #5
  9. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    use all lowercase


    In compliance with current w3c standards (xhtml, etc..), this article should not have used the picket fence reference to event calls, but instead push for developers to use all lowercase letters. (e.g; onload, onmouseover, onchange, etc...). It would be a good idea to revise this article to enforce standards-compliant web development as we move away from html and tag soup. Thanks!
  10. #6
  11. No Profile Picture
    Large Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2002
    Location
    Ridley Park, PA
    Posts
    3
    Rep Power
    0

    Re: use all lowercase


    I disagree. The so-called "picket fence" case usage makes for easier reading. The all lower-case XHTML recommendation, I believe, refers only to tags, not to event names. If I'm wrong, then the *standard* needs revising, *not* the case usage.

    Code readability is more important than any slavish adherance to standards. BTW the W3C only proposes "recommendations".
  12. #7
  13. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: use all lowercase


    element and attribute names must be in lowercase for valid xhtml markup. The examples in the article will not validate as xhtml since they are not lowercase. The article could help to make things easier for future development by practicing and teaching valid markup.

    FWIW, saying that readability is easier for these short event handlers when there is mixed case lettering is a subjective opinion. Adhering to xhtml rules to return valid xhtml markup is worth the time and you'll find out that it's actually easier to read the resulting markup. And that is a fact.
  14. #8
  15. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    [Menu Layer]


    Nothing to say about this article, it is great to start developping some Javascript !

    Just continue, and next time, speak about how to create Menu with layer... please

    See u,

    jul,

  16. #9
  17. No Profile Picture
    CF sMod
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Maine, USA (a.k.a. Boonies)
    Posts
    242
    Rep Power
    15

    Where's the real info?


    Part 2 maybe, but I didn't see a single mention of the well-supported DOM2 Events model in Gecko, nor IE's proprietary Events model as well.

    Using HTML events solely as the only means to add listeners quickly becomes limiting, and perhaps at least a mention of these models (and addEventListener/attachEvent) should have been included. Even if they will be in part 2, its nice to know that there are other ways of doing things before actually knowing them.

    I also have to point out a small error:
    "The "document" object refers to the document body"

    No, it refers to the document, including processing instructions, the documentElement, etc. Hence "document" as the object name. When document inherits from HTMLDocument, then document.body actually refers to the body of the document. But if document inherits from XMLDocument instead... there is no body property (i.e. if an XHTML document has a mime-type of text/xml or application/xhtml+xml). But document itself never refers to just solely an HTMLBodyElement.

    Perhaps I took the statement too literally, but it is best to be clear on these things. :)
    Jason Contact Me
    Super moderator @ CodingForums
  18. #10
  19. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: use all lowercase


    .. a bit like RFCs being "requests for comments" eh ? <grin>
  20. #11
  21. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: use all lowercase


    The XHTML-recommendation refers to both tags AND attributes. onload and other event names ARE attributes according to W3C.
    You're right about the status of W3C-documents. They are recommendations. UA-makers do tend to adhere to the recommendations more and more. Doing so makes the internet more open -just like it is intended to be. There is no good reason for denying this recommendations, so please do.

    Picket fence usage makes sense in longer terms, as in onFinishLoadingAndShowingThisEntireElement or in PictureOfMySpouseAndMyTwoBeautifulBlondGirls.jpg . onload on the other hand is so both short and common, that it doesn't need picket fences
  22. #12
  23. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Specifying scripting language


    An other remark: HTML does 'recommend' to declare the scripting language, certainly when using intrinsic events. Currently most browsers do tend to have JavaScript as their default language. Relying on this could be quit dangerous in the battle of browsers. IE6 and Java may be a warning for IE7 to rely on VB as default language.
    A simple line as
    <META http-equiv="Content-Script-Type" content="text/javascript"> in the header is all that's needed.
    [See: http://www.w3.org/TR/html4/interact/scripts.html#h-18.2.2.1 ]
  24. #13
  25. No Profile Picture
    Large Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2002
    Location
    Ridley Park, PA
    Posts
    3
    Rep Power
    0

    Re: use all lowercase


    Your name shows as "Anonymous User".
    Please tell me who you are so that I may post a reply to you. Thanks.
  26. #14
  27. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2002
    Location
    Haarlem, The Netherlands
    Posts
    1
    Rep Power
    0

    Re: use all lowercase


    I guess this will do. Looking forward to your reply.
    Ronald
  28. #15
  29. No Profile Picture
    Large Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2002
    Location
    Ridley Park, PA
    Posts
    3
    Rep Power
    0

    Re: use all lowercase


    Thanks for your comments.

    I believe in one solution that always works and to not have more than one good way of doing a thing *if at all possible*.

    Thus, if
    "onfinishladingadsowingtisetireeement" doesn't work because it's too long for the eye to decipher and
    "onFinishLoadingAndShowingThisEntireElement" does work, then "onClick" is better than "onclick" even though the name is short. Picket-fence case is simply more readable than all-lower-case. Whether it is "needed" or not is irrelevant.

    Keep thinks simple and uniform. Always do what always works. That's my philosophy.

    Unfortunately, the W3C doesn't "like" picket-fence case, for some reason even though I, and most people find it easier to read. Maybe there's a lot of e.e. cummings fans at the W3C! :-)

    And, for me anyway, it's a moot point. I'm re-writing my web pages in XHTML and not only will the pages not validate if you use picket-fence case, they won't work either! Try onClick="somefunction();" Doesn't work, whereas onclick="somefunction();"
    At least not in IE6.

    On the other hand, since the W3C has opted for all-lower-case and I will name my identifiers in picket-fence, ther won't be any naming conflicts. :-)
Page 1 of 2 12 Last
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo