Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6687737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:19:26+00:00 2026-05-26T05:19:26+00:00

in my php script at the top i have require_once(‘../registration/include/membersite_config.php’); wich is a class

  • 0

in my php script at the top i have require_once('../registration/include/membersite_config.php'); wich is a class with all my site functions. This class is called fgmembersite. There is a function inside that i normaly call with $fgmembersite->stats but now i have to call it from a jquery function.

In the same php script i have this jquery code:

$('a.slick-toggle').click(function(){
      var the_id = $(this).attr('href');
      var div_id = $('#job_' + the_id);
      if ($(div_id).is(":visible")==false) {
      //Here i will put the AJAX CALL
      }
      $(div_id).toggle(400);
      return false;
    });

I want to call the stats() function form the jquery code when my condition is trigered, but this function is inside a class wich is already loaded with the requiere_once from the top.

Normaly when i make an ajax call i pass the parameters via POST to a function writen in other php file using for example: $.ajax({ url: 'addremovelive.php', data: {addname: val,addlevel: val1}, type: 'post',success: function(d) {$('#add_lang_level').val('');$('#add_lang').val('');}});

Using that method means that i will have to change my struture in the class in order to respond to a post call. There is another method to call my function using jquery/ajax?

Thanks for any orientation!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T05:19:26+00:00Added an answer on May 26, 2026 at 5:19 am

    You can’t call methods/functions or anything from jquery directly.
    But what you can do is trigger only the required method with a post/get variable from jquery. Means you have to add as you did before a post call to the file with the functions and yes – change the method so that it gets triggered as soon as a certain post/get variable is included in the call.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PHP script that initialises an image gallery. It loops through all
I have a PHP script which parses an rss feed and outputs the top
So, I have page where a PHP script echoes out all of my HTML
I have an a string declared at the top of my PHP script: $dirname
I have a script called ranking.php. I call this script at the top of
In a PHP script I want to get just the URL of the top
I have created a PHP-script to update a web server that is live inside
I have a PHP script that runs as a CGI program and the HTTP
I have a PHP script that needs to determine if it's been executed via
I have a PHP script that can encode a PNG image to a Base64

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.