Hi guys
I have a link to my adminAction.
The adminAction renders the view, which also contains this piece of ajax code:
var request = $.ajax({
url: "Admin",
type: "GET",
cache: false,
data: {parentID : myPK},
dataType: "html"
});
However, the link to the adminAction, influences the url generated by the above ajax:
If the link to my adminAction is:
<a href="<?php echo Yii::app()->request->baseUrl; ?>/index.php/controller/admin">Roles</a>
then the Ajax-url is correct:
http://.../index.php/controller/Admin?parentID=47
But if the link to my adminAction is:
<?php echo CHtml::link('Roles',array('controller/admin')); ?>
then the Ajax-url does not contain the controller name, resulting in a 404 error:
http://.../index.php/Admin?parentID=47
Any ideas why this could be happening?
Thanx