If I want to change all the links on my site in to Ajax calls - what would be the best way to go about that?
For example:
a standard Yii app uses 'main.php' in the 'layouts' directory as a frame, and content gets echoed from the various pages thru the $content variable -
My question is, how would one go about turning a standard link into a Ajax call that would replace the $content variable (and whatever other elements such as page title)?
Please let me know or if I can provide you with any more details as to what I am trying to do here -
seem to have got it working to a certain degree, but my target div now gets the entire site delivered to it (so it looks like i have one site inside the other)
i can feel i am getting close to a solution…
here is the code snippet that i used:
<?php echo CHtml::ajaxLink('Check out This Module',array('/ModuleName/'), array(
'type'=>'POST',
'update'=>'#center_content',
)); ?>
as you might imagine, there is a div in my main.php file with the id 'center_content'
the question now: how do i NOT include all the drama surrounding this div?