Results 1 to 19 of 19

Thread: [RESOLVED] Minimizing Javascript use

Threaded View

  1. #4
    Frenzied Member
    Join Date
    Apr 2009
    Location
    CA, USA
    Posts
    1,516

    Re: Minimizing Javascript use

    Quote Originally Posted by Nightwalker83 View Post
    I was wondering what other things php could be used for that javascript/ajax would normally do?
    You kind of have it backwards. The stuff that people do with JS (and AJAX by extension) is more "normally" done with just server side scripting; JS has just gotten pretty popular lately*, so people are adding flourishes to their pages.

    *By which I mean useful, elegant Javascript as opposed to the stuff of the early 90s where every Geocities page had a "Enter name:", "Welcome, name!" alert pop-up, followed by no less than 3 scripting error warnings. Ah, those were the days...

    Form validation, for example - you submit your form and do the validity checking with PHP. If something was wrong, you'd send the person back to the form page. Javascript is convenient here because it can check the form data without leaving the initial page that the form is on, whereas PHP needs to load at least one new page in this scenario. Obviously users appreciate convenience, but the point is that it's not necessary.

    That's [usually] what Javascript is for: adding some functionality that's not necessary, but nice.

    Although, that makes be wonder if there is a php alternative to javascript that flash uses to show buttons.
    Not sure what you mean here...
    Last edited by SambaNeko; Dec 29th, 2009 at 08:57 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width