I am very good at getting ajax to respond data from a php file and input that data into a certain div, but what im having problems with is coding an ajax response that will grab a value from a php file, then depending on that value ---- ajax will run a certain function i have specified.
Something like this
1) Ajax gets checkmsg.php?response=msgtrue
2) Ajax reads the data(or output) from the php file (for example the response might be msgtrue)
3) Ajax takes the value returned from php and runs some function
4) that function runs and does what i specify it to do!
Simply Put
--- Ajax Request ----
---PHP data returned to ajax ---
---Ajax runs a function depending on php repsonse ---
---User sees the function ---
i was trying to write a if statement in javascript, that states
if (phpdata=msgtrue)
{
launch_some_function();
}



Reply With Quote


Bookmarks