Thanks AD.
I have gone through RequestHandler and I changed the code according to
that.
And it is working fine..
And I removed my ajax.thtml , it is not at all required.
AD7six wrote:
add the RequestHandler component to your app controller and amongst
other things it will ensure that you get
You're right. You should an default.thtml used to load all the pages in a non-AJAX way (this pages contains all the scripts) and ajax.thtml for the AJAX communication.Usually the AJAX transfers are simply data so it's improbably that you need some other scripts to work with it.
Regards,-- Pablo
Ok.. I have created a new layout - default.thtml
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
html
head
?php echo $html-charset('UTF-8');?
titleMy Site title/title
?php echo
Hi,
In my site I want all things should be done through ajax. So I have
created ajax.thtml and kept that file in layouts folder. And in
app_controller I have changed the layout to ajax.
Now the problem is after clicking on any link , will load the
respective page without refreshing the
Suggestions of how to see what's wrong with generated HTML: Look at it
through Firefox, with the Web Developer extension loaded in. It
includes a toolbar option to 'View Generated Source'.
Don't know if it'll help, but I use it often.
Regards,
- Toby (bigClown) Parent
Download the firebug extension to firefox, so you can see the trasfers.Your ajax layout should not contain any doctype definitio, nor html, head, body tags, because what you're sending isn't a new document but a fragment of html (in general you're sending some data to process)
You can't load any