Ich habe einen Anruf Ajax wie folgt vor:Passing Wert von Zend-Controller und es in JS Antwort Holen
$.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);
}
Und das ist meine Zend-Controller Aktion:
public function signindoAction()
{
// doing something here with the values passed from the view
}
Die Aktion nicht braucht um im Grunde alles zurückzugeben, da es nur überprüft, ob die Login-Daten in Ordnung sind. Was ich jedoch hier tun muss, ist irgendwie in der Aktion zu sagen, dass, wenn die Antwort von Javascript zurückgegeben wird, dass es irgendwie die Daten holt, mit denen ich in der JS-Skriptdatei arbeiten muss. Wie kann ich das mit Zend Framework machen? Kann mir bitte jemand helfen?
guys, anyone ??? – perkes456