zend framework - Zend_Dojo_Form onSubmit -


I have a content with a remote page, I am trying to submit the form, and stay within the panel For, either displaying the form on error or reporting success I'm sure it is easy but I have been stumped, not the first time, I'm not sure at all.

Store Form:

  class Services_Form_Store extends Zend_Dojo_Form {secure $ _actionUrl; Public function __ composition ($ actionsUrl = null, $ options = null) {origin: __ creation ($ option); $ This- & gt; SetActionUrl ($ actionUrl); $ This- & gt; Init (); } Public Function Set Action URL ($ actionUrl) {$ this- & gt; _actionUrl = $ actionUrl; $ This return; } Public function init () {$ required = true; $ This- & gt; Setmath ('Post') - & gt; Set Attributes ('id', 'storearm') - & gt; Set Attribute ('name', 'storearm') - & gt; Set Attributes ('Onshoot', 'Dojo.XHRT (Sub) Return False;'); $ This- & gt; Adjustment ('Text Box', 'Location', Array ('Label' = & gt; 'Place Name:', 'Required' => True, 'Trim' = & gt; => True)); $ Submit = new Zend_Form_Element_Submit ('submit'); $ Submit- & gt; SetLabel ('save'); $ This- & gt; AddElement (present $); }}  

My view:

  & lt; Script type = "dojo / method" event = "onSubmit" & gt; Var all = {url: "/ storemamager / new", Load: function (data) {dojo.byId ('storeform'). Value = data; }, Error: function (data) {console.debug ("Error submitting data:" + data); }, Timeout: 2000, form: "store"} & lt; / Script & gt; & Lt ;? Php echo (empty ($ this-> formResponse)? '': '& Lt; p class = "errors" & gt;' $ this- & gt; formResponse. '& Lt; / p & gt; ); ? & Gt; & Lt ;? Php echo $ this- & gt; Form; ? & Gt;   

div class = "post-text" itemprop = "Text">

Barking the wrong tree My form has a button move with an onclick event.

  $ this-> AddElement ('button', 'submit', array ('label' = & gt; 'save', 'onclick' = & gt; 'dojo.xhrPost ({url: "url", timeout: 2000, form: Form "}); ' 

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -