Page 1 of 1

"e.hitch is not a function" on my ajax calls. anyone understand it?

Posted: 03 March 2024, 16:39
by c12h22o11_
On a few of my ajax calls, I am getting:

Code: Select all

Client error: TypeError: Error during callback from url ... e.hitch(...) is not a function. During distilledsugar/distilledsugar/reveal.html Received: {"status":1,"data":{"valid":1,"data":null}}
Anyone understand what this e.hitch() problem is?

Re: "e.hitch is not a function" on my ajax calls. anyone understand it?

Posted: 06 March 2024, 15:11
by nicotacotac
What is you Ajax call code?
And content of distilledsugar.action.php ( the reveal function) ?

Re: "e.hitch is not a function" on my ajax calls. anyone understand it?

Posted: 12 March 2024, 01:15
by c12h22o11_
This is the backend code:

public function reveal() {
self::setAjaxMode();
$deck = self::getArg("deck", AT_alphanum, true );
$this->game->waterReveal($deck);
self::ajaxResponse();
}


This is the js code

this.ajaxcall( "/distilledsugartwo/distilledsugartwo/reveal.html", {
deck: D,
deck2: decks[ii],
deck3: decks[ii],
deck4: "fiddlesticks",
trigger: args ? args.trigger : null,
})

Re: "e.hitch is not a function" on my ajax calls. anyone understand it?

Posted: 12 March 2024, 01:54
by RicardoRix
The ajax call looks a bit odd.
You're only passing args, there is no ending ; and you don't have lock: true in the args.
Not really sure what the consequences would be though.

This is pretty much taken straight from the example in the new project code they give you:

Code: Select all

	var args = {};
		args['lock'] = true;		
		args['dodge'] = dodge;		
		args['prank'] = prank;		
		
		this.ajaxcall( "/auntiemildred/auntiemildred/gaindodgeprank.html", args, this, function( result ) {}, function( is_error) {} );		   

Re: "e.hitch is not a function" on my ajax calls. anyone understand it?

Posted: 22 March 2024, 06:17
by c12h22o11_
Answer was here: viewtopic.php?t=10261