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

Help: How to keep the Dialogue box staying to display status after submission

Expand Messages
  • rynchio
    Hi, I was trying to build a tell-a-friend form using the Dialogue Quickstart example at here http://developer.yahoo.com/yui/examples/container/dialog/1.html
    Message 1 of 3 , Feb 1, 2007
    • 0 Attachment
      Hi,

      I was trying to build a tell-a-friend form using the Dialogue
      Quickstart example at here
      http://developer.yahoo.com/yui/examples/container/dialog/1.html

      However, once the form is submitted, the dialogue panel disappeared
      immediately, and status message was display on the main page. So I
      wonder if it's possible to keep the dialogue panel staying open while
      displaying the asynchronous status message showing up on the panel
      bottom until user explicitly close it. If possible, how can I approach
      it? Is there any event listening obj or parameters to do that?

      Any help would be highly appreciated!!!
    • rynchio
      So after I poked around the API documentatation and experimented a littl e bit, I figured out that by using YAHOO.widget.Dialog.Dialog1.doSubmit() method
      Message 2 of 3 , Feb 2, 2007
      • 0 Attachment
        So after I poked around the API documentatation and experimented a
        littl e bit, I figured out that by using
        YAHOO.widget.Dialog.Dialog1.doSubmit() method instead of the submit()
        method documented in the example will do the trick to keep the Dialog
        panel staying open. However, this poses a new issue: all the form
        validation hook-in methods are not being executed hence the form
        validation is failing. Is there any way to work around this? Or is it
        because I shouldn't use doSubmit()?


        @reference:
        http://developer.yahoo.com/yui/docs/YAHOO.widget.Dialog.html#doSubmit

        --- In ydn-javascript@yahoogroups.com, "rynchio" <wangyeah50@...> wrote:
        >
        > Hi,
        >
        > I was trying to build a tell-a-friend form using the Dialogue
        > Quickstart example at here
        > http://developer.yahoo.com/yui/examples/container/dialog/1.html
        >
        > However, once the form is submitted, the dialogue panel disappeared
        > immediately, and status message was display on the main page. So I
        > wonder if it's possible to keep the dialogue panel staying open while
        > displaying the asynchronous status message showing up on the panel
        > bottom until user explicitly close it. If possible, how can I approach
        > it? Is there any event listening obj or parameters to do that?
        >
        > Any help would be highly appreciated!!!
        >
      • Eric Miraglia
        rynchio, There is no provision in the API for what you re trying to do, unfortunately. It s a good idea though; please consider adding a feature request for
        Message 3 of 3 , Feb 2, 2007
        • 0 Attachment
          rynchio,

          There is no provision in the API for what you're trying to do,
          unfortunately. It's a good idea though; please consider adding a
          feature request for this
          (http://developer.yahoo.com/yui/articles/reportingbugs/);

          To achieve the effect you want, you'll need to override your Dialog
          instance's submit() method, commenting out the line that reads this.hide:

          mydialog.submit = function() {
          if (this.validate()) {
          this.beforeSubmitEvent.fire();
          this.doSubmit();
          this.submitEvent.fire();
          //this.hide();
          return true;
          } else {
          return false;
          }
          };

          Regards,
          Eric


          --- In ydn-javascript@yahoogroups.com, "rynchio" <wangyeah50@...> wrote:
          >
          > So after I poked around the API documentatation and experimented a
          > littl e bit, I figured out that by using
          > YAHOO.widget.Dialog.Dialog1.doSubmit() method instead of the submit()
          > method documented in the example will do the trick to keep the Dialog
          > panel staying open. However, this poses a new issue: all the form
          > validation hook-in methods are not being executed hence the form
          > validation is failing. Is there any way to work around this? Or is it
          > because I shouldn't use doSubmit()?
          >
          >
          > @reference:
          > http://developer.yahoo.com/yui/docs/YAHOO.widget.Dialog.html#doSubmit
          >
          > --- In ydn-javascript@yahoogroups.com, "rynchio" <wangyeah50@> wrote:
          > >
          > > Hi,
          > >
          > > I was trying to build a tell-a-friend form using the Dialogue
          > > Quickstart example at here
          > > http://developer.yahoo.com/yui/examples/container/dialog/1.html
          > >
          > > However, once the form is submitted, the dialogue panel disappeared
          > > immediately, and status message was display on the main page. So I
          > > wonder if it's possible to keep the dialogue panel staying open while
          > > displaying the asynchronous status message showing up on the panel
          > > bottom until user explicitly close it. If possible, how can I approach
          > > it? Is there any event listening obj or parameters to do that?
          > >
          > > Any help would be highly appreciated!!!
          > >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.