Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] Dialog hidden on form submit, how to override the behaviour?

Expand Messages
  • Jing Ceawlin
    After digging into the source code, I think you can use the manual mode, without losing the built in async functionality. Watch this(from source code): /** *
    Message 1 of 9 , Dec 31, 2007
    • 0 Attachment
      After digging into the source code, I think you can use the manual mode, without losing the built in async functionality.
      Watch this(from source code):
      /**
      * Executes a submit of the Dialog followed by a hide, if validation
      * is successful.
      * @method submit
      */
      submit: function () {
      if (this.validate()) {
      this.beforeSubmitEvent.fire();
      this.doSubmit();
      this.submitEvent.fire();
      this.hide();
      return true;
      } else {
      return false;
      }
      },


      All you need to do is to copy the submit code block, except the line to do the hiding.
      If you don't want to change the mode, I think you already know how to override the submit function. The result is the same.

      Hope this helps.

      On Dec 31, 2007 9:53 PM, Nico Giraldi <monnezza@...> wrote:

      Jing Ceawlin ha scritto:
      >
      > From the documentation: "Forms can be processed in 3 ways -- via an
      > asynchronous Connection utility call, a simple form POST or GET, or
      > manually."
      > I think the manual mode will meet your need.
      >
      > .
      I am using async connection to send data and i would like to use the
      built in connection instead of set form submission to "manually" and
      then to creare a async connection to send data. I guess there is a
      better way for not hiding the dialog window. Thanks for help!


    • Nico Giraldi
      Message 2 of 9 , Dec 31, 2007
      • 0 Attachment
        Jing Ceawlin ha scritto:
        >
        > After digging into the source code, I think you can use the manual
        > mode, without losing the built in async functionality.
        > Watch this(from source code):
        > /**
        > * Executes a submit of the Dialog followed by a hide, if validation
        > * is successful.
        > * @method submit
        > */
        > submit: function () {
        > if (this.validate()) {
        > this.beforeSubmitEvent.fire();
        > this.doSubmit();
        > this.submitEvent.fire();
        > this.hide();
        > return true;
        > } else {
        > return false;
        > }
        > },
        >
        >
        > All you need to do is to copy the submit code block, except the line
        > to do the hiding.
        > If you don't want to change the mode, I think you already know how to
        > override the submit function. The result is the same.
        >
        > Hope this helps.
        >






















        > I will try soon ! thanks for help!
        >

        > .
        >
        >
      • Alan Pinstein
        I you need more examples, I created my own Panel subclass to achieve this. Basically it s my own Dialog alternative... look at the code in:
        Message 3 of 9 , Jan 1, 2008
        • 0 Attachment
          I you need more examples, I created my own Panel subclass to achieve this. Basically it's my own Dialog alternative... look at the code in:


          You can see it in action here:


          It's the one labeled PhocoaDialog.

          Alan


          On Dec 31, 2007, at 10:31 AM, Nico Giraldi wrote:

          Jing Ceawlin ha scritto:
          >
          > After digging into the source code, I think you can use the manual 
          > mode, without losing the built in async functionality.
          > Watch this(from source code):
          > /**
          > * Executes a submit of the Dialog followed by a hide, if validation
          > * is successful.
          > * @method submit
          > */
          > submit: function () {
          > if (this.validate( )) {
          > this.beforeSubmitEv ent.fire( );
          > this.doSubmit( );
          > this.submitEvent. fire();
          > this.hide();
          > return true;
          > } else {
          > return false;
          > }
          > },
          >
          >
          > All you need to do is to copy the submit code block, except the line 
          > to do the hiding.
          > If you don't want to change the mode, I think you already know how to 
          > override the submit function. The result is the same.
          >
          > Hope this helps.
          >

          > I will try soon ! thanks for help!
          >

          > .
          >
          > 


        • Hollywood
          FYI, Out of Memory at line: 10 errors in IE7. ... From: Alan Pinstein To: ydn-javascript@yahoogroups.com Sent: Tuesday, January 01, 2008 9:51 AM Subject: Re:
          Message 4 of 9 , Jan 1, 2008
          • 0 Attachment
            FYI, "Out of Memory at line: 10" errors in IE7.
             
            ----- Original Message -----
            Sent: Tuesday, January 01, 2008 9:51 AM
            Subject: Re: [ydn-javascript] Dialog hidden on form submit, how to override the behaviour?

            I you need more examples, I created my own Panel subclass to achieve this. Basically it's my own Dialog alternative. .. look at the code in:



            You can see it in action here:


            It's the one labeled PhocoaDialog.

            Alan


            On Dec 31, 2007, at 10:31 AM, Nico Giraldi wrote:

            Jing Ceawlin ha scritto:
            >
            > After digging into the source code, I think you can use the manual 
            > mode, without losing the built in async functionality.
            > Watch this(from source code):
            > /**
            > * Executes a submit of the Dialog followed by a hide, if validation
            > * is successful.
            > * @method submit
            > */
            > submit: function () {
            > if (this.validate( )) {
            > this.beforeSubmitEv ent.fire( );
            > this.doSubmit( );
            > this.submitEvent. fire();
            > this.hide();
            > return true;
            > } else {
            > return false;
            > }
            > },
            >
            >
            > All you need to do is to copy the submit code block, except the line 
            > to do the hiding.
            > If you don't want to change the mode, I think you already know how to 
            > override the submit function. The result is the same.
            >
            > Hope this helps.
            >

            > I will try soon ! thanks for help!
            >

            > .
            >
            > 


          • Alan Pinstein
            Huh, thanks! I get a Object Expected error, not an OOM, but thanks, I ll look into it! I hadn t seen that before. Looks like it s related to my use of
            Message 5 of 9 , Jan 1, 2008
            • 0 Attachment
              Huh, thanks! I get a "Object Expected" error, not an OOM, but thanks, I'll look into it!

              I hadn't seen that before. Looks like it's related to my use of YUILoader...

              Alan

              On Jan 1, 2008, at 11:21 AM, Hollywood wrote:


              FYI, "Out of Memory at line: 10" errors in IE7.
               
              ----- Original Message -----
              Sent: Tuesday, January 01, 2008 9:51 AM
              Subject: Re: [ydn-javascript] Dialog hidden on form submit, how to override the behaviour?

              I you need more examples, I created my own Panel subclass to achieve this. Basically it's my own Dialog alternative. .. look at the code in:



              You can see it in action here:


              It's the one labeled PhocoaDialog.

              Alan


              On Dec 31, 2007, at 10:31 AM, Nico Giraldi wrote:

              Jing Ceawlin ha scritto:
              >
              > After digging into the source code, I think you can use the manual 
              > mode, without losing the built in async functionality.
              > Watch this(from source code):
              > /**
              > * Executes a submit of the Dialog followed by a hide, if validation
              > * is successful.
              > * @method submit
              > */
              > submit: function () {
              > if (this.validate( )) {
              > this.beforeSubmitEv ent.fire( );
              > this.doSubmit( );
              > this.submitEvent. fire();
              > this.hide();
              > return true;
              > } else {
              > return false;
              > }
              > },
              >
              >
              > All you need to do is to copy the submit code block, except the line 
              > to do the hiding.
              > If you don't want to change the mode, I think you already know how to 
              > override the submit function. The result is the same.
              >
              > Hope this helps.
              >

              > I will try soon ! thanks for help!
              >

              > .
              >
              > 





            Your message has been successfully submitted and would be delivered to recipients shortly.