Link to home
Start Free TrialLog in
Avatar of DCCoolBreeze
DCCoolBreeze

asked on

Javascript: Executing a PHP function; Obtaining the PHP return value

I need to use javascript to execute a php function and then obtain the value the php function returns.  This is a problem I need to solve at work.  I enter the URL of the php into the web browser and a new window appears with the value I need to save.  Also, what do I need to install to be able to develop and test a similar issue from home?  i.e. some server that allows me to use a php function that will return a value that I can extract via javascript.  Finally, I am new to javascript and php, what are to tools I need to use to develop, test and implement javascript and php???
SOLUTION
Avatar of gr8gonzo
gr8gonzo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DCCoolBreeze
DCCoolBreeze

ASKER

Julian,

It looks like the solution you provide may be what I am looking for.  Question though.  what javascript variable will hold the data.  I am doing this for work.  They use adobe capitivate for training and it uses javascript.  I want to get one data value from the company database by calling a PHP script (I understand now that it is not a function but it is referred to as a script).  So I want to execute the php script and save the returned value to a javascript variable.  Then I can use the Captivate API to pull that value from the javascript variable to captivate and display it.

It looks like jQuery is the way to go.

Also, are there any publically available php scripts that I can call to test from home?  maybe from google or some other company.... say a publically available date/time php script that I could use for testing from home.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial