Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google      Sign In   
  • Create Account

Subscribe to HRA Now!

 



Are you a Google Analytics enthusiast?

Share and download Custom Google Analytics Reports, dashboards and advanced segments--for FREE! 

 



 

 www.CustomReportSharing.com 

From the folks who brought you High Rankings!



Photo
- - - - -

Change Include Without Reloading Whole Page


  • Please log in to reply
5 replies to this topic

#1 piskie

piskie

    HR 7

  • Active Members
  • PipPipPipPipPipPipPip
  • 1,098 posts
  • Location:Cornwall

Posted 30 August 2011 - 04:49 AM

Can anyone please help me to find a way to change the content produced by a PHP Include without reloading the entire page.

The include produces a Div containing a scrolling list of links generated from a MYSQL query.
I would like to reload this list according to say different ORDER BY criteria without the overhead of reloading the whole page and it's Pix etc.

#2 Santosh

Santosh

    HR 3

  • Members
  • PipPipPip
  • 56 posts

Posted 30 August 2011 - 12:05 PM

QUOTE(piskie @ Aug 30 2011, 04:49 AM) View Post
Can anyone please help me to find a way to change the content produced by a PHP Include without reloading the entire page.

The include produces a Div containing a scrolling list of links generated from a MYSQL query.
I would like to reload this list according to say different ORDER BY criteria without the overhead of reloading the whole page and it's Pix etc.



Using Ajax it is possible,No need to use PHP include() function page just create a seperate php page that you want to show within <div> tag and call that page using ajax.You can search in google you will get similar code.I hope it 'll help you.

#3 piskie

piskie

    HR 7

  • Active Members
  • PipPipPipPipPipPipPip
  • 1,098 posts
  • Location:Cornwall

Posted 31 August 2011 - 10:14 AM

Thanks Parth
I haven't used Ajax yet, so this seems to be the spur I needed to get to grips with it.

#4 imbrod

imbrod

    HR 1

  • Members
  • Pip
  • 3 posts

Posted 21 September 2011 - 05:44 AM

QUOTE(piskie @ Aug 31 2011, 10:14 AM) View Post
Thanks Parth
I haven't used Ajax yet, so this seems to be the spur I needed to get to grips with it.


Any luck? I'm also interested in this answer...

#5 piskie

piskie

    HR 7

  • Active Members
  • PipPipPipPipPipPipPip
  • 1,098 posts
  • Location:Cornwall

Posted 21 September 2011 - 08:31 AM

Not yet Imbrod
I found the inertia of getting to grips with Ajax to be too much of a time consuming hurdle at this stage of the project.
So at the moment, I am fully reloading the page with the delay penalty that it involves.
I will retrofit the solution either Ajax or whatever after meeting the client completion deadlines.

Meanwhile, anyone else who wishes to contribute with an Ajax or other method head start is most welcome.

#6 cfreek

cfreek

    AAAHHHH!!1one1!

  • Active Members
  • PipPipPipPip
  • 166 posts
  • Location:Richmond, Virginia, Earth

Posted 21 September 2011 - 09:47 AM

Iím a big fan of jQuery, and they have a lot of Ajax functionality built in.
http://api.jquery.com/category/ajax/

You could probably just use .get()
http://api.jquery.com/jQuery.get/

With something along the lines of (untested):
CODE
$.get("test.php", { var1: "value", var2: "value" },
    function(data){
        $('#divID').html(data);
    });





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

SPAM FREE FORUM!
 
If you are just registering to spam,
don't bother. You will be wasting your
time as your spam will never see the
light of day!