Actions

J1.5 talk

Difference between revisions of "Adding AJAX to your component"

From Joomla! Documentation

m (Content-Type Header: new section)
Line 5: Line 5:
 
As I tried that in a component in Joomla 1.5, I needed to to set the content-type of the response to xml: header("Content-type: text/xml");  
 
As I tried that in a component in Joomla 1.5, I needed to to set the content-type of the response to xml: header("Content-type: text/xml");  
 
Joomla does't seem to check the type of content in the output buffer to make the correct settings (which is good).
 
Joomla does't seem to check the type of content in the output buffer to make the correct settings (which is good).
 +
 +
== index2.php note ==
 +
In Joomla 1.6 and newer, you can't use anymore index2.php. Instead use component URL + &tmpl=component, e.g. <i>index.php?option=com_mycomponent&view=mycomponent&Itemid=5181&tmpl=component</i>
 +
<br/>[[User:John prog|John prog]] ([[User talk:John prog|talk]]) 02:35, 26 September 2012 (CDT)

Revision as of 02:35, 26 September 2012

This is a very interesting approach. I would like to have some more information concerning this approach and I'm willing to help to improve the article

Content-Type Header

As I tried that in a component in Joomla 1.5, I needed to to set the content-type of the response to xml: header("Content-type: text/xml"); Joomla does't seem to check the type of content in the output buffer to make the correct settings (which is good).

index2.php note

In Joomla 1.6 and newer, you can't use anymore index2.php. Instead use component URL + &tmpl=component, e.g. index.php?option=com_mycomponent&view=mycomponent&Itemid=5181&tmpl=component
John prog (talk) 02:35, 26 September 2012 (CDT)