Hi all, I have created a form that extends Zend_Dojo_Form. I am able to get it to show up by creating a controller and an action.
Here's my code for the controller UserController.php Code: public function editinfoAction() { $form = new forms_EditInfoForm(); if ($this->_request->isPost()) { $formData = $this->_request->getPost(); if ($form->isValid($formData)) { echo 'success'; exit; } else { $form->populate($formData); } } $this->view->form = $form; } I can then view the dojo form on my local host http://localhost:8888/user/editinfo/ This works fine. Now, what I'm trying to do is use an xhrGet to load this form within a div of another page, and this is when things break down. The form itself shows up but it doesn't look like any of the dijit functionality is available. I am guessing this has to do with the way I am loading dojo, but I can't seem to find the answers. Have any of you guys out there tried to do anything like this? My main page (which contains the div) uses a layout in which dojo is enabled. The editinfo page uses a different layout which also loads dojo (i know this is wrong but i did that to test that i was actually doing the form stuff right). What I don't know is what the right way is to load this form using an xhrGet call and have it actually have dijit functionality working. This is the code I'm using to load the page within my div Code: // let's call the ajax url now so we can update the page dojo.xhrGet( { // The following URL must match that used to test the server. url: ajaxurl, handleAs: "text", timeout: 5000, // Time in milliseconds // The LOAD function will be called on a successful response. load: function(response, ioArgs) { dojo.byId("profileContent").innerHTML = response; return response; }, // The ERROR function will be called in an error case. error: function(response, ioArgs) { console.error("HTTP status code: ", ioArgs.xhr.status); return response; } }); I hope that makes sense.. anyone have any ideas that could help me? Do I need to disable layouts on the editinfo stuff? If so, how do I make sure that the dijit stuff will work? Help!! Thanks so much!! -- View this message in context: http://www.nabble.com/Loading-a-dojo-form-in-a-div-using-xhrGet-tp22213011p22213011.html Sent from the Zend Framework mailing list archive at Nabble.com.