Welcome Guest, Not a member yet? Register   Sign In
Accesing jQuery from Controller
#1

[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>
&lt;/head&gt;

&lt;body&gt;

<A oonclick="edCat('admincms/edcategory/');" class="ui-state-default ui-corner-all" style="text-decoration: none; cursor: pointer;">View</A>

&lt;/body&gt;

CONTROLLER:
Code:
function edcategory($cname)
{
  echo 'End Date: &lt;input type=text name=enddate id=catdatev value='.$date.'&gt;'
}

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


Messages In This Thread
Accesing jQuery from Controller - by El Forum - 08-09-2009, 08:15 PM
Accesing jQuery from Controller - by El Forum - 08-10-2009, 02:11 AM
Accesing jQuery from Controller - by El Forum - 08-10-2009, 08:08 PM
Accesing jQuery from Controller - by El Forum - 08-10-2009, 08:39 PM
Accesing jQuery from Controller - by El Forum - 08-12-2009, 12:52 AM
Accesing jQuery from Controller - by El Forum - 08-12-2009, 01:52 AM
Accesing jQuery from Controller - by El Forum - 08-12-2009, 02:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB