Welcome Guest, Not a member yet? Register   Sign In
Correct url to controller from kendo datasource
#2

[eluser]Sudz[/eluser]
Hi,

Define a variable in your js and set it to your domain name like below
Code:
var SITEROOT = "www.yourdomainname.com";

// and now set url like this
$("#customersGrid").kendoGrid({
            dataSource: {
                transport: {
                    read: {
                        url:  SITEROOT + "/index.php/customers/get_customers",
                        dataType: "json"
                    }
                },


If you have removed index.php from your url then your code will be like this
Code:
$("#customersGrid").kendoGrid({
            dataSource: {
                transport: {
                    read: {
                        url: SITEROOT + "/customers/get_customers",
                        dataType: "json"
                    }
                },


Messages In This Thread
Correct url to controller from kendo datasource - by El Forum - 04-23-2013, 02:23 AM
Correct url to controller from kendo datasource - by El Forum - 04-26-2013, 11:28 AM
Correct url to controller from kendo datasource - by El Forum - 04-26-2013, 12:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB