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

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

Expand Messages
  • Nico Giraldi
    Hello, i am using the dialog widget and i would like to keep the dialog window visible after form has been submited. Is it possible to override the default
    Message 1 of 9 , Dec 31, 2007
      Hello,
      i am using the dialog widget and i would like to keep the dialog window
      visible after form has been submited. Is it possible to override the
      default behaviour? how to?
    • Jing Ceawlin
      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
      Message 2 of 9 , Dec 31, 2007
        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.

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

        Hello,
        i am using the dialog widget and i would like to keep the dialog window
        visible after form has been submited. Is it possible to override the
        default behaviour? how to?


      • Nico Giraldi
        ... 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
        Message 3 of 9 , Dec 31, 2007
          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!
        • 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 4 of 9 , Dec 31, 2007
            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 5 of 9 , Dec 31, 2007
              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 6 of 9 , Jan 1, 2008
                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 7 of 9 , Jan 1, 2008
                  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 8 of 9 , Jan 1, 2008
                    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.