Hi,
I'm trying to develop a module whose front end user interface uses xajax. I've created code that works (if I move it from cmsms it's fine). I get an "xml entity declared outside ...." error when the xajax calls returns in my java script console. The xml returned is valid.
I did some reading and some people found whitespace, but I cannot find a whitespace error in my templates or the code that ouputs the page headers.
Any help appreciated,
Alan
xajax error
xajax error
--
Alan Ryan
Lead Developer
CodeCrunchers Internet Software Development - Ireland
http://www.codecrunchers.ie
Alan Ryan
Lead Developer
CodeCrunchers Internet Software Development - Ireland
http://www.codecrunchers.ie
Re: xajax error
I did some digging last night and found out that the reason this is happeningis that the entire page seems to be getting sent rather than the xml request. I'm new to Ajax so my terminology may be off here. To fix this in the admin section, so that Ajax works I added
This allows for ajax to work in the admin section. At the front end for my module (action.default.php), I could not figure out how to supress the content / buffer the data. So I divided my default code in two: action.ajaxsetup.php & and action.default.php.
I have to place
and later on i the template
before the opening html tag in my template, this means that the Xajax object is created before the headers are created. This is a dirty hack and I would like to know how to buffer the content so that I can have all my code in one module 'action'
CMSMS rocks!
Thanks,
Alan
Code: Select all
function SuppressAdminOutput($params){
return true;
}
I have to place
Code: Select all
{cms_module module="euroCV" actiond="ajaxsetup"}
and later on i the template
Code: Select all
{cms_module module="euroCV"}
CMSMS rocks!
Thanks,
Alan
--
Alan Ryan
Lead Developer
CodeCrunchers Internet Software Development - Ireland
http://www.codecrunchers.ie
Alan Ryan
Lead Developer
CodeCrunchers Internet Software Development - Ireland
http://www.codecrunchers.ie
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: xajax error
Look at the Uploads module action.getfile.php or in the FLVPlayer module.
to disable the admin theme output you can add a "showtemplate=false" parameter to the url.
to be sure that there is no output in the buffer before you send yours out, you can use ob_clear() like uploads does.
to disable the admin theme output you can add a "showtemplate=false" parameter to the url.
to be sure that there is no output in the buffer before you send yours out, you can use ob_clear() like uploads does.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: xajax error
hey there,
Thanks for that, I would have spent a long time digging.
Alan
Thanks for that, I would have spent a long time digging.
Alan
--
Alan Ryan
Lead Developer
CodeCrunchers Internet Software Development - Ireland
http://www.codecrunchers.ie
Alan Ryan
Lead Developer
CodeCrunchers Internet Software Development - Ireland
http://www.codecrunchers.ie