Javascript in a php document

Discussion in 'Javascript' started by Bo Dudek, Sep 22, 2003.

  1. Bo Dudek

    Bo Dudek Guest

    Hi

    I have this thought, that I'd like to share:

    Sometimes I'm using javascript in my webpages to create different kind
    of form-interactions. Sometimes I have an inputfield, and in this
    field theres a short description text like "Type your name here".

    When a user clicks the field, I use the OnFocus and OnBlur
    eventhandlers to remove the description text to allow the user to type
    his own text.

    But isn't it right, that no matter what I do, the javascript will
    ALWAYS be interperated by the users browser and NOT by the server? And
    therefore, if the user doesn't allow javascript, he won't be able to
    use my little nifty thing?

    Kind regards
    Bo Dudek
    www.bodudek.dk
     
    Bo Dudek, Sep 22, 2003
    #1
    1. Advertising

  2. (Bo Dudek) writes:

    > But isn't it right, that no matter what I do, the javascript will
    > ALWAYS be interperated by the users browser and NOT by the server?


    Absolutely correct.

    > And therefore, if the user doesn't allow javascript, he won't be
    > able to use my little nifty thing?


    Correct. That is why Javascript should only be used to enhance a page,
    not to create the basic fuctionality. There are quite a lot of people
    who browse without Javascript (11% in some counts), either because
    they use browsers without Javascript or because they have turned it
    off. A good page should degrade nicely when Javascript isn't
    available, and still retain full functionality, even if it might
    require a little more work to use it.

    /L
    --
    Lasse Reichstein Nielsen -
    Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
    'Faith without judgement merely degrades the spirit divine.'
     
    Lasse Reichstein Nielsen, Sep 22, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ted Zeng
    Replies:
    4
    Views:
    545
    Tim Arnold
    Oct 3, 2006
  2. Rajive Narain
    Replies:
    0
    Views:
    1,988
    Rajive Narain
    Sep 18, 2009
  3. eastcoastguyz
    Replies:
    1
    Views:
    114
    Flamer
    Jul 11, 2006
  4. Replies:
    3
    Views:
    228
    frothpoker
    Sep 4, 2006
  5. __
    Replies:
    1
    Views:
    126
    Gregor Kofler
    Oct 2, 2007
Loading...

Share This Page