SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Ajax in Ajax

  1. #1
    SitePoint Enthusiast
    Join Date
    May 2011
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Ajax in Ajax

    I'm using ajax navigation on my site because I think it does produce a rather nice effect.

    The plus is that it is also degradable when javascript is turned off.

    However, I have a problem... Is it possible to run ajax on the already ajaxified page.

    SpatialVoid :: Premium Custom Designing, go to contact and im using ajax contact form. When you submit it, the script fallsback to non javascript.

    How can I get ajax working on pages that are ajaxed?

    Thanks.

  2. #2
    Barefoot on the Moon! silver trophy
    Force Flow's Avatar
    Join Date
    Jul 2003
    Location
    Northeastern USA
    Posts
    4,516
    Mentioned
    51 Post(s)
    Tagged
    1 Thread(s)
    The way you have things now, when you press the submit button, the page sends an HTML POST request to your PHP page. Then the PHP page loads in your browser.

    Instead, you'll need to use the jQuery post method to submit the information to the PHP page and retrieve information sent back: jQuery.post() – jQuery API

    It's a little complicated, so I'd advise to start out by doing a little googling for tutorials and examples as a first step, then come back with more specific questions as they come up.
    Visit The Blog | Follow On Twitter
    301tool 1.1.5 - URL redirector & shortener (PHP/MySQL)
    Can be hosted on and utilize your own domain

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2011
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was hoping therell be an easier solution, should i just take out ajax navigation?

  4. #4
    Barefoot on the Moon! silver trophy
    Force Flow's Avatar
    Join Date
    Jul 2003
    Location
    Northeastern USA
    Posts
    4,516
    Mentioned
    51 Post(s)
    Tagged
    1 Thread(s)
    I would. It's less complicated that way, and really isn't necessary in this case.
    Visit The Blog | Follow On Twitter
    301tool 1.1.5 - URL redirector & shortener (PHP/MySQL)
    Can be hosted on and utilize your own domain


Tags for this Thread

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
  •