SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Mar 2006
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    implementing ajax within a php page

    All the ajax example I have seen so far have separate codes for the html mark up and a separate php page. Is it not possible for the ajax script to call the same page? e.g Just like a form that has action to call itself.

    Thanks

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,786
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    An ajax script is not calling for a complete web page, it is instead calling for some data to be passed back to display in the current page. As such the headers for the data to be retrieved would be different from those of a regular web page and combining the code into one page would just make things more complicated with no actual benefit.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Bookmarks

Posting Permissions

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