2016-10-12 2 views
0

リダイレクト用のスクリプトを追加したいと思います。amemberプロでjqueryを使う方法

/amember/library/Am/Paysystem/Abstract.php in thanksaction function 

に私は次のコード

$response->addScript() 
       ->setScript(<<<CUT 
jQuery(function($){ 

window.location.href ="http://www.google.com/"; 
}); 
CUT 
); 

を使用しています。しかし、私は次のエラーを取得しています:

Fatal error: Call to undefined method Am_Mvc_Response::addScript() in /amemberroot/library/Am/Paysystem/Abstract.php 

が問題に何ができるか、誰を知っていますか?
ありがとうございます。

答えて

0

Am_Mvc_Responseクラスには、addScriptというメソッドはありません。 aMemberにはオープンソースコードがあり、常にクラス宣言をチェックできます。リダイレクトを行うには、次のコードを使用してください:

Am_Mvc_Response::redirectLocation("http://www.google.com/"); 
関連する問題