Home » Forum
NoNumber!

Joomla!® Websites & Extensions
development  -  support  -  consultancy

I try to respond within 48 hours (excluding weekends).
If I haven't responded by then, feel free to post a reminder or bug me via email.

My last reply was: 17 Hours, 7 Minutes ago.

Welcome, Guest
Please Login or Register.    Lost Password?

AJAX call doesn't return variables
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: AJAX call doesn't return variables
#6463
AJAX call doesn't return variables 2 Years, 1 Month ago  
I have a sourcerer tag in a joomla page that makes an AJAX call to retrieve some data from a database. My server side php program creates a text string from the data variables however they come back blank on the client side. If I call the php file outside of joomla I get the expected results. Don't know if this is a Sourcerer issue or if joomla is intervening somehow with the AJAX results?

I can return a pure text string just fine however any variables that I concatenate in the string disappear in joomla. Stuck.

For example:

$address is a variable that contains data from an SQL query.

When I return:

echo $address;

nothing comes back to the client (at least that I can see).

If I do:

echo "Hello" . $address;

I get Hello but no address. If I call this program outside of joomla I get Hello and the address.

Thanks for any advice.
Bruce Olson
Posts: 2
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#6474
Re: AJAX call doesn't return variables 2 Years, 1 Month ago  
Try including the file instead of placing the code within the article.
See here for more info on that:
www.nonumber.nl/forum/14-sourcerer/5172-...o-include-a-php-file
Peter van Westen
Admin
Posts: 9165
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#6477
Re:AJAX call doesn't return variables 2 Years ago  
I am using include not the code.
Bruce Olson
Posts: 2
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#6478
Re:AJAX call doesn't return variables 2 Years ago  
I mean, also do the other stuff in the external file. Like the
echo 'Hello '.$address;
Peter van Westen
Admin
Posts: 9165
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
Go to topPage: 1
Moderators: Peter van Westen
Open Source Training | Online Joomla! Training and Support
hosting joomla
MaxCDN | Content Delivery Network | Accelerate your site to the max