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

Re: [ydn-javascript] Dialog Form Doesn't Submit

Expand Messages
  • Satyam
    You are trying to submit the form to a server different from the one where the page is loaded. The connection manager cannot do that. That is the same
    Message 1 of 8 , Dec 31, 2007
      You are trying to submit the form to a server different from the one where
      the page is loaded. The connection manager cannot do that. That is the
      'same origin policy' that browsers enforce and there is little YUI can do
      (actually, now it does that little, but not yet with the form submission),
      it is a limitation on the XHR object which is what YUI eventually uses.

      Satyam

      ----- Original Message -----
      From: "Del" <dhanoad@...>
      To: <ydn-javascript@yahoogroups.com>
      Sent: Monday, December 31, 2007 4:36 AM
      Subject: [ydn-javascript] Dialog Form Doesn't Submit


      >I have been playing around with the dialog form for a looong time now.
      > I could never get the form to submit for some reason and posted here
      > about 6 months ago and never received a response so I am trying again
      > with version 2.4.1.
      >
      > This time I even copied the example over to my server verbatim to see
      > if the form would submit.
      >
      > For some reason it does not (still).
      >
      > I assume it has to do with:
      >
      > var handleSubmit = function() {
      > this.submit();
      > };
      >
      > All of the dependencies are the same as the example. No errors in
      > Firebug. The form doesn't disappear after clicking submit -- nothing
      > happens.
      >
      > Here is a live version of the example copied over:
      >
      > http://www.gabbr.com/bookmarks/indexYUI.php
      >
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      > --
      > No virus found in this incoming message.
      > Checked by AVG Free Edition.
      > Version: 7.5.516 / Virus Database: 269.17.12/1203 - Release Date:
      > 30/12/2007 11:27
      >
      >
    • Deeþan Chakravarthy
      ... I just saw your example, not sure why the form does not disappear.. however you can force the form to disappear using javascript and then submit.. just
      Message 2 of 8 , Dec 31, 2007
        Del wrote:
        >
        > I have been playing around with the dialog form for a looong time now.
        > I could never get the form to submit for some reason and posted here
        > about 6 months ago and never received a response so I am trying again
        > with version 2.4.1.
        >
        > This time I even copied the example over to my server verbatim to see
        > if the form would submit.
        >
        > For some reason it does not (still).
        >
        > I assume it has to do with:
        >
        > var handleSubmit = function() {
        > this.submit();
        > };
        >
        > All of the dependencies are the same as the example. No errors in
        > Firebug. The form doesn't disappear after clicking submit -- nothing
        > happens.
        >
        > Here is a live version of the example copied over:
        >
        > http://www.gabbr.com/bookmarks/indexYUI.php
        > <http://www.gabbr.com/bookmarks/indexYUI.php>
        >



























        I just saw your example, not sure why the form does not disappear..
        however you can force the form to disappear using javascript and then
        submit.. just extend your handleSubmit() function.. let me know if you
        find the solution..


        --
        Deepan
        http://sudoku-solver.net/
      • Satyam
        ... From: Deeþan Chakravarthy To: Sent: Monday, December 31, 2007 1:29 PM Subject: Re:
        Message 3 of 8 , Dec 31, 2007
          ----- Original Message -----
          From: "Deeþan Chakravarthy" <codeshepherd@...>
          To: <ydn-javascript@yahoogroups.com>
          Sent: Monday, December 31, 2007 1:29 PM
          Subject: Re: [ydn-javascript] Dialog Form Doesn't Submit


          > Del wrote:
          >>
          >> I have been playing around with the dialog form for a looong time now.
          >> I could never get the form to submit for some reason and posted here
          >> about 6 months ago and never received a response so I am trying again
          >> with version 2.4.1.
          >>
          >> This time I even copied the example over to my server verbatim to see
          >> if the form would submit.
          >>
          >> For some reason it does not (still).
          >>
          >> I assume it has to do with:
          >>
          >> var handleSubmit = function() {
          >> this.submit();
          >> };
          >>
          >> All of the dependencies are the same as the example. No errors in
          >> Firebug. The form doesn't disappear after clicking submit -- nothing
          >> happens.
          >>
          >> Here is a live version of the example copied over:
          >>
          >> http://www.gabbr.com/bookmarks/indexYUI.php
          >> <http://www.gabbr.com/bookmarks/indexYUI.php>
          >>
          >
          >
          >
          > I just saw your example, not sure why the form does not disappear..
          > however you can force the form to disappear using javascript and then
          > submit.. just extend your handleSubmit() function.. let me know if you
          > find the solution..
          >
          >
          > --
          > Deepan
          > http://sudoku-solver.net/

          When the error is produced in the call to the XHR object to prime the
          connection to a foreign host, the error bubbles up to some try-catch block
          somewhere and skips the rest of the code for the form submit so it never
          gets to the hiding part. You can set the browser debugger to break on
          error, but it actually breaks on untrapped errors, which this is not.

          Satyam
        • Del
          Satyam, I guess I should have added that I have tried linking to the Yahoo! served js files as well -- same problem. See? :
          Message 4 of 8 , Jan 14, 2008
            Satyam,

            I guess I should have added that I have tried linking to the Yahoo!
            served js files as well -- same problem. See? :

            http://www.gabbr.com/bookmarks/indexYUI.php




            --- In ydn-javascript@yahoogroups.com, "Satyam" <satyam@...> wrote:
            >
            > You are trying to submit the form to a server different from the one
            where
            > the page is loaded. The connection manager cannot do that. That is
            the
            > 'same origin policy' that browsers enforce and there is little YUI
            can do
            > (actually, now it does that little, but not yet with the form
            submission),
            > it is a limitation on the XHR object which is what YUI eventually uses.
            >
            > Satyam
            >
            > ----- Original Message -----
            > From: "Del" <dhanoad@...>
            > To: <ydn-javascript@yahoogroups.com>
            > Sent: Monday, December 31, 2007 4:36 AM
            > Subject: [ydn-javascript] Dialog Form Doesn't Submit
            >
            >
            > >I have been playing around with the dialog form for a looong time now.
            > > I could never get the form to submit for some reason and posted here
            > > about 6 months ago and never received a response so I am trying again
            > > with version 2.4.1.
            > >
            > > This time I even copied the example over to my server verbatim to see
            > > if the form would submit.
            > >
            > > For some reason it does not (still).
            > >
            > > I assume it has to do with:
            > >
            > > var handleSubmit = function() {
            > > this.submit();
            > > };
            > >
            > > All of the dependencies are the same as the example. No errors in
            > > Firebug. The form doesn't disappear after clicking submit -- nothing
            > > happens.
            > >
            > > Here is a live version of the example copied over:
            > >
            > > http://www.gabbr.com/bookmarks/indexYUI.php
            > >
            > >
            > >
            > >
            > > Yahoo! Groups Links
            > >
            > >
            > >
            > >
            > >
            > > --
            > > No virus found in this incoming message.
            > > Checked by AVG Free Edition.
            > > Version: 7.5.516 / Virus Database: 269.17.12/1203 - Release Date:
            > > 30/12/2007 11:27
            > >
            > >
            >
          • Del
            extending handleSubmit() function shouldn t be the answer Deepan, it should work regardless. still doesn t: http://www.gabbr.com/bookmarks/indexYUI.php not
            Message 5 of 8 , Jan 14, 2008
              extending handleSubmit() function shouldn't be the answer Deepan, it
              should work regardless.

              still doesn't:

              http://www.gabbr.com/bookmarks/indexYUI.php

              not sure why...


              --- In ydn-javascript@yahoogroups.com, Deeþan Chakravarthy
              <codeshepherd@...> wrote:
              >
              > Del wrote:
              > >
              > > I have been playing around with the dialog form for a looong time now.
              > > I could never get the form to submit for some reason and posted here
              > > about 6 months ago and never received a response so I am trying again
              > > with version 2.4.1.
              > >
              > > This time I even copied the example over to my server verbatim to see
              > > if the form would submit.
              > >
              > > For some reason it does not (still).
              > >
              > > I assume it has to do with:
              > >
              > > var handleSubmit = function() {
              > > this.submit();
              > > };
              > >
              > > All of the dependencies are the same as the example. No errors in
              > > Firebug. The form doesn't disappear after clicking submit -- nothing
              > > happens.
              > >
              > > Here is a live version of the example copied over:
              > >
              > > http://www.gabbr.com/bookmarks/indexYUI.php
              > > <http://www.gabbr.com/bookmarks/indexYUI.php>
              > >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              >
              > I just saw your example, not sure why the form does not disappear..
              > however you can force the form to disappear using javascript and then
              > submit.. just extend your handleSubmit() function.. let me know if you
              > find the solution..
              >
              >
              > --
              > Deepan
              > http://sudoku-solver.net/
              >
            • Satyen Desai
              Hi Del, Your http://www.gabbr.com/bookmarks/indexYUI.php example won t work. You re posting an async request across domains [ from http://www.gabbr.com, where
              Message 6 of 8 , Jan 15, 2008
                Hi Del,

                Your http://www.gabbr.com/bookmarks/indexYUI.php example won't work.

                You're posting an async request across domains [ from
                http://www.gabbr.com, where you are hosting the page, to
                http://developer.yahoo.com ] which is not permitted*

                I don't know if this is also the problem with your original page, but on
                the URL above, try changing the "action" of the form to post to a URL on
                gabbr.com. That should work.

                You can also set the "postmethod" config property to "form" to verify
                whether or not this is the problem - this submits the form "the old
                fashioned way" and is allowed to go cross domain.

                Another reason the submit may not be going through on your original
                page, could be that you have a validate function defined which doesn't
                return "true".

                If you still have trouble, can you post a URL to your original page.

                Regards,
                Satyen

                * The exception which gets thrown in such circumstances is being
                swallowed as a result of the submit code being invoked inside a
                CustomEvent subscriber.
              Your message has been successfully submitted and would be delivered to recipients shortly.