Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
How to call PHP function with javascript
Old 08-13-2007, 12:50 AM How to call PHP function with javascript
dlaroche22's Avatar
Skilled Talker

Posts: 84
Name: Dustin Laroche
Trades: 0
I have a PHP function on the server that I would like to call from a page that has already been sent to the client using javascript. I have a chat script that has a PHP backend that has a sign out function that needs to be called when a user navigates from chat.php so the user logs out correctly from the chat. Or, is it possible to pick up window events ( window closed, or page navigated from ) using PHP??? Thanks for the help, and i know this is a unique problem so feel free to dive in.

Last edited by dlaroche22; 08-13-2007 at 01:09 AM..
dlaroche22 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-13-2007, 04:42 AM Re: How to call PHP function with javascript
JamieLewis's Avatar
Pretty Much a Big Deal...

Latest Blog Post:
Gooie
Posts: 385
Name: Jamie Lewis
Location: UK
Trades: 0
You will need to use AJAX for this. Its a method of using JavaScript to pass values to and from the server. The technique is too long and detailed to be described here, your best bet is to google it.

Jamie
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
JamieLewis is offline
Reply With Quote
View Public Profile Visit JamieLewis's homepage!
 
Old 08-13-2007, 06:13 AM Re: How to call PHP function with javascript
Super Talker

Posts: 104
Location: http://www.joomladevs.com
Trades: 0
There is no direct method to do this but you can definitely do it using AJAX.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE


saurabhj is offline
Reply With Quote
View Public Profile Visit saurabhj's homepage!
 
Old 08-13-2007, 08:53 AM Re: How to call PHP function with javascript
dlaroche22's Avatar
Skilled Talker

Posts: 84
Name: Dustin Laroche
Trades: 0
Thanks i figured it out.
dlaroche22 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How to call PHP function with javascript
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.20836 seconds with 12 queries