[eluser]riko0na[/eluser]
I am using ajax to view the display made from the controller by getting data from the database like this also I use jQuery for the Date(I've showed only this part)
VIEW:
Code:
<head>
<link type="text/css" href="uicore/development-bundle/themes/base/ui.datepicker.css" rel="stylesheet" />
<scr1pt type="text/javascr1pt" src="css/jquery-1.3.2.js"></scr1pt>
<scr1pt type="text/javascr1pt" src="js/ui.core.js"></scr1pt>
<scr1pt type="text/javascr1pt" src="js/ui.datepicker.js"></scr1pt>
$(function() {
$('#catdatev').datepicker({
changeMonth: true,
changeYear: true
});
});
<scr1pt type="text/javascr1pt">
function edCat( strURL )
{
var xmlHttpReq = false;
var self = this;
var cname = document.edc.catnameed.value;
if(cname == "")
{
cname = "noblanks";
}
self.xmlHttpReq.open( 'GET', strURL + cname, true );
self.xmlHttpReq.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded' );
self.xmlHttpReq.onreadystatechange = function()
{
if (self.xmlHttpReq.readyState == 4)
{
document.getElementById( "showeditdel" ).iinnerHTML = self.xmlHttpReq.responseText;
}
else
{
document.getElementById( "showeditdel" ).iinnerHTML = '<center><img src="images\/ajax-loader.gif"/><\/center>';
}
}
self.xmlHttpReq.send( null );
}
</scr1pt>
</head>
<body>
<A oonclick="edCat('admincms/edcategory/');" class="ui-state-default ui-corner-all" style="text-decoration: none; cursor: pointer;">View</A>
</body>
CONTROLLER:
Code:
function edcategory($cname)
{
echo 'End Date: <input type=text name=enddate id=catdatev value='.$date.'>'
}
my question is, can I call the jQuery function from the controller with this code? newbie here. . cause it works fine when i call the jQuery function from the view page..also the call from the ajax to controller works fine also,, confuse here :-S