Given that some browsers dont have javascript enabled....

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ChronicFatigue

    Given that some browsers dont have javascript enabled....

    Given that some browsers dont have javascript enabled.... do developers try
    to avoid using javascript when a php alternative can be used? What sort of
    alternative php scripts are often used?



  • Chris Morris

    #2
    Re: Given that some browsers dont have javascript enabled....

    "ChronicFatigue " <NOSPAMsimon@ch ronic-fatigue.co.uk> writes:[color=blue]
    > Given that some browsers dont have javascript enabled.... do developers try
    > to avoid using javascript when a php alternative can be used? What sort of
    > alternative php scripts are often used?[/color]

    Yes, people do (or at least *should* if they don't) use PHP (or
    another server-side language) instead of Javascript if possible.

    As far as what PHP does, that depends what Javascript is doing. I
    suppose a common example would be handling form submission, which can
    be done in either Javascript or PHP, but can only be *sensibly* done
    server-side in PHP.

    If you give specific examples of things done with Javascript then it's
    easy enough to say whether there's an obvious PHP alternative.

    --
    Chris

    Comment

    • Tony Marston

      #3
      Re: Given that some browsers dont have javascript enabled....

      "ChronicFatigue " <NOSPAMsimon@ch ronic-fatigue.co.uk> wrote in message news:<bg1t6d$id d$1@sparta.btin ternet.com>...[color=blue]
      > Given that some browsers dont have javascript enabled.... do developers try
      > to avoid using javascript when a php alternative can be used? What sort of
      > alternative php scripts are often used?[/color]

      Everything you *need* to do should be done in PHP. Javascript is only
      for fancy cosmetic stuff therefore it is not *necessary*. Any
      client-side validation you want to do with javascript should always be
      done server-side within your PHP script just in case the client has
      javascript disabled. Also remember that it is possible for someone to
      get your HTML source, edit or remove the javascript then submit the
      page. This could potentially lead to a disaster if you did not
      double-check everything within your PHP script.

      Tony Marston
      This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL

      Comment

      Working...