私が持っているようなAjax呼び出し、以下:Zendのコントローラから値を渡すと、JS応答でそれをフェッチ
$.post("/user/signindo",{'username':username,"password":password},function(data)
{
// this is what I would like to be able to have in my data object, to be able to access these properties and display them once response is there
alert(data.id);
alert(data.username);
alert(data.firstname);
}
をそして、これは私のZendコントローラのアクションです:
public function signindoAction()
{
// doing something here with the values passed from the view
}
アクションはないのニーズ基本的に何かを返すためには、ログインデータがOKかどうかをチェックするだけです。しかし、私がここで行う必要があるのは、応答がJavascriptによって返されたときに、JSスクリプトファイル内で処理する必要のあるデータを何とか取得するというアクションで何らかのことを言うことです。 Zendフレームワークでこれをどうすればできますか?誰かが私を助けてくれますか?
みんな、誰? – perkes456