I’m currently developing a widget in social engine.
what I am trying to do now is to call a php function within the loaded page using jQuery(the jQuery file is an external file) but all I can find is by to use .get , .post or .ajax in. are there any ways to call the function?
Since it is built in socialengine, I am only allowed to load Controller.php and index.tpl for php files.
Thanks in advance!
You cannot call php function from JavaScript, but you could call the current page and pass parameters in the request. It would require a reload of the page, but your PHP app could check for parameters and execute function.
… do something and call jQuery GET to page passing ?action=0 for example in request.
There is a possibility you could build something using ajax with JSONP with a callback, so your PHP app executes callback but probably more complex that what you need.