Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Javascript in a php document

Reply
Thread Tools

Javascript in a php document

 
 
Bo Dudek
Guest
Posts: n/a
 
      09-22-2003
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
 
Reply With Quote
 
 
 
 
Lasse Reichstein Nielsen
Guest
Posts: n/a
 
      09-22-2003
http://www.velocityreviews.com/forums/(E-Mail Removed) (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 - (E-Mail Removed)
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Training Institute In Delhi, Live Projects on PHP. Short TermPHP Courses, PHP Scripts, PHP Training with Live Projects. Rajive Narain Java 0 09-18-2009 10:47 AM
Validate your html forms with javascript and php with a simple php class __ Javascript 1 10-02-2007 11:06 AM
php and python: how to unpickle using PHP? Ted Zeng Python 4 10-03-2006 03:07 PM
Writing a PHP and Javascript generated page to a PHP variable... jonnyblazed@gmail.com Javascript 3 09-04-2006 12:45 PM
How is a PHP (.php) or JavaScript web site spidered by search engines? eastcoastguyz Javascript 1 07-11-2006 03:52 AM



Advertisments