0
votes

I get this error:

Uncaught TypeError: Object #<Interact> has no method 'getmyData'

the problem is that it's true!

'Interact' has no method 'getmyData' it's 'myhandler' that contains it.

it's not supposed to go look for it in 'Interact' in first place but in 'myhandler' !

I have no clue why its acting like this because everything was working fine and suddenly i get this error!

Some code:

myHandler.ashx :

<%@ WebHandler Language="C#" Class="myHandler" %>
...
public class myHandler : JsonRpcHandler, IRequiresSessionState
{

[JsonRpcMethod()]
public string getmyData()
{
.. 
}

i call it in my script:

var obj = new myHandler();
...
listeners: {
    selectionchange: function (model, records) {

        myStore.loadData(Ext.decode(obj.getmyData()));

        }

Let me know if u need more details!

1
It might be POST or GET issues. Check request type. - Andrey Selitsky
what request? there is no get or post here - Armance
so how do you load data? :) I supposed you send ajax request to your server code. For example your server handler i configured to accept only POST request, but you are sending GET. Check in Firebug, Net or Console tabs. - Andrey Selitsky
i load data with this function from extjs loadData() and get data from server side function by calling getmyData() - Armance
yep, but your store is loading it for you with AJAX request. - Andrey Selitsky

1 Answers

0
votes

solved seems there was an interferance or something

all i had to do is change the name of my var:

var obj = new myHandler();

to something else like

var mh = new myHandler();