Archived

This topic is now archived and is closed to further replies.

  • 0

Call Php Function Using Jquery Ajax Inside A Custom Section ?

Question

Posted · Report post

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

4 answers to this question

Posted · Report post

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.

Share this post


Link to post
Share on other sites

Posted · Report post

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

Posted · Report post

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.

Share this post


Link to post
Share on other sites

Posted · Report post

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