Read data from serverside file?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Muffinthief
    New Member
    • May 2007
    • 51

    Read data from serverside file?

    Hey, This is a pretty simple question. Is there any easy way to read data from a server side file. I know that Javascript is client side. I was thinking you write a php script to get the data, then open that url in Javascipt? Is it possible to use javascript to get the code of a url? Sorry this is probably very noobish. Thanks guys!
  • hsriat
    Recognized Expert Top Contributor
    • Jan 2008
    • 1653

    #2
    Perhaps this is what that/those person(s) would have thought to do, who ended up developing Ajax.

    Comment

    • Muffinthief
      New Member
      • May 2007
      • 51

      #3
      Ok wow, I'm smart. (sarcasm) Thanks!

      Comment

      • hsriat
        Recognized Expert Top Contributor
        • Jan 2008
        • 1653

        #4
        Of course you are smart! The only thing is you are few years late :) (j/k)

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          If the server-side file returns something which JavaScript can read, e.g. JSON, then you can also use a dynamically created script element.

          PS. Ajax wasn't necessarily developed. It was a term coined to make it easier to refer to the new approach in web development in this article.

          Comment

          • hsriat
            Recognized Expert Top Contributor
            • Jan 2008
            • 1653

            #6
            Originally posted by acoder
            PS. Ajax wasn't necessarily developed. It was a term coined to make it easier to refer to the new approach in web development in this article.
            Oh man, could you please atleast let something sound good? :p

            (j/k)


            Regards

            Comment

            Working...