www.webdeveloper.com
Results 1 to 2 of 2

Thread: Java Script -vs- PHP

  1. #1
    Join Date
    Apr 2009
    Posts
    346

    Java Script -vs- PHP

    I've noticed by looking at the code of a lot of websites, that most of them use Java Script in place of PHP. Is there a good reason for this? Is Java Script better to use than PHP?

    I've seen sites where they use Java Script for links, even if the links have no rollover images or anything. Instead they could use simple anchor tags but they add Java Script to it. Why?

    Am I missing something in regards to Java Script?

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Quote Originally Posted by Ntrimgs View Post
    I've noticed by looking at the code of a lot of websites, that most of them use Java Script in place of PHP. Is there a good reason for this? Is Java Script better to use than PHP?
    PHP is used server-side, JavaScript is client-side. The one is not used in place of the other.

    Quote Originally Posted by Ntrimgs View Post
    I've seen sites where they use Java Script for links, even if the links have no rollover images or anything. Instead they could use simple anchor tags but they add Java Script to it. Why?
    This creates accessibility problems; the link does not work when JavaScript is disabled. It's very bad practice to do this. http://javascript.about.com/od/hints...scriptlink.htm
    At least 98% of internet users' DNA is identical to that of chimpanzees

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles