Jump to content
Sign in to follow this  
shannoga

Call Php Function Using Jquery Ajax Inside A Custom Section ?

Recommended Posts

shannoga    0
shannoga

Hi 

 

I am calling a Facebook Graph API methods from a custom section I made.

It is very slow and I wish to call it with ajax only when the user asks for it.

 

I have tried -

jQuery('li').click(function(){
							
		jQuery.ajax({
			type :'GET',
			url  : 'get_album_images.php',
			success : function() {
                        }
              	});
});

What I can not figure is:

  1. Were should I put the php file and what id the correct url to it (I need it to be inside the section).
  2. Is that the right way to do it ?

How can I approach this from a section ?

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Hi,

 

I am not sure what you mean when you say "Were should I put the php file and what id the correct url to it (I need it to be inside the section)."

 

Can you go into more detail please.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
shannoga    0
shannoga

I can not figure out what should be the path to the php file that will hold the php functions for the ajax call?

assuming that the php file is in the section folder.

Share this post


Link to post
Share on other sites
Rob    547
Rob

It seems you're playing in the core files which is an unsupported activity that voids support.

 

There is a functions.php file found inside the PageLines Customize plugin (free in the Store > Plugins) or one inside the Base Theme (also free in the Store > Themes).  Use one of those or you will not only lose support, but likely crash your site.

 

Make absolutely sure you have the PageLines Sections plugin installed (found at Dashboard > PageLines > Store > (Sections which is the default)).

 

I should say that the majority of broken sites come from conflicts with jQuery.  Be prepared for anything. Since this is a customization, we'd not be able to provide technical help to resolve it except to say undo what was done.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
shannoga    0
shannoga

Hey

 

I don't understand your answer.

 

I am using a base theme and not the Customize plugin. I am using many jQuery plugins in my sections and the websites works great.

I am only trying to understand how to call jQuery ajax calls inside a section thats all.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×