Hello Support
I am very new to JomSocial but I am trying to add a popup to a page using the below routine from your documentation.
var ajaxCall = 'jax.call("community", "events,ajaxGetLoction")';
cWindowShow(ajaxCall, '', 450, 300);
in the file c:\xampp\htdocs\test\components\com_community\controllers\events.php the routine below is working to generate the correct html.
public function ajaxGetLoction()
{
if (!COwnerHelper::isRegisteredUser()) {
return $this->ajaxBlockUnregister();
}
$objResponse = new JAXResponse ();
if(empty($notiHtml)){
$notiHtml .= '<div class=" col-md-1">';
$notiHtml .= ' SHOW SOMETHING...';
$notiHtml .= '</div>';
}
$objResponse->addAssign('cwin_logo', 'innerHTML', 'LOCATION');
$objResponse->addScriptCall('cWindowAddContent', $notiHtml);
$objResponse->sendResponse();
}
however, the JavaScript file http://localhost/test/plugins/system/azrul.system/pc_includes/ajax_1.5.pack.js receives an invalid string and throws an error .
//make sure that the result text is a valid value
try {
if(text !== undefined && text !== null){
if(text.length > 0){
text = text.substr(responseLength, text.length-responseLength);
eval( text );
responseLength = xmlhttp.responseText.length;
lastResponseLength = text.length
if(lastResponse != text) {
jax.processResponse(text);
}
lastResponse = text;
//console.log('TEXT:' + text);
}
}
}catch (e) {
//sometimes the response is chunked, this not a valid string to be eval()'ed.
//lets just ignore this
}
After $objResponse->sendResponse() is called, where should I look first to find the html output sent by the php routine? How can I best troubleshoot and resolve this issue?
Thanks
realtec
Note: no online support needed.