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

Re: Connection Manager

Expand Messages
  • tssha
    ... With IE7(and future releases) supporting XHR in JS, a fallback solution to ActiveX/IE is unlikely to happen. Connection Manager is centered around the
    Message 1 of 14 , Jan 31, 2007
    • 0 Attachment
      --- In ydn-javascript@yahoogroups.com, "rasper" <rasper@...> wrote:
      >
      > Hello,
      >
      > are there any future plans to implement a fallback solution for
      > IE(iframe) when ActiveX is disabled?
      >
      > Best regards
      > Andreas

      With IE7(and future releases) supporting XHR in JS, a fallback
      solution to ActiveX/IE is unlikely to happen.

      Connection Manager is centered around the capabilities(and
      restrictions) of the XHR object. Providing fallback mechanisms will
      provide a subset of that functionality at best, while adding to the
      code overhead.

      However, you are free to tailor the instantiation logic to your needs,
      if you desire to have a fallback.

      Regards,
      Thomas
    • dwbauer2222
      I would like to read a local file using the Connection Manager. This will never return a status of 200 (0 is the correct response); therefore I never fall
      Message 2 of 14 , May 15, 2009
      • 0 Attachment
        I would like to read a local file using the Connection Manager. This will never return a status of 200 (0 is the 'correct' response); therefore I never fall in to the success code. But even in the failure code, why don't I have access to the xhr object?
      • learningyui
        Hi Group, I am trying to make an AJAX call to a Perl script which returns XML using Perl s XML::Simple. When I run the Perl script directly from the command
        Message 3 of 14 , Jul 2, 2009
        • 0 Attachment
          Hi Group,

          I am trying to make an AJAX call to a Perl script which returns XML using Perl's XML::Simple.

          When I run the Perl script directly from the command line, everything works and I see the XML code which I posted below.

          However, I am getting nothing back on the webpage, and when I alert the (o.repsonseXML) to the screen, I get NULL.

          Any suggestions?

          The code is below:
          a) Sample XML returned by Perl
          b) The AJAX Call
          c) The Perl code


          a)

          <Data>
          <Fields>
          <Field1>3</Field1>
          <Field10>Name</Field10>
          <Field2>Email</Field2>
          <Field3>Phone</Field3>
          </Fields>
          </Data>


          b)

          var sURL = "../cgi-bin/Eric/GDFtoXML.pl";
          var callback = {success: success_handler, failure: failure_handler, timeout: 10000};


          function success_handler(o) {
          document.getElementById('content').innerHTML = o.responseXML;
          alert(o.responseXML);
          }


          function send_request() {
          var callback = { success:success_handler, failure:failure_handler, timeout: 10000 };
          YAHOO.util.Connect.asyncRequest('POST', sURL, callback);
          }


          c) Note: this uses XML::Simple from CPAN

          my $xml = $xs->XMLout(\%myHash, noattr => 1, RootName=>'Data');
          print "<?xml version='1.0' encoding='UTF-8'?>\n";
          print "$xml";
          return $xml;
        • Michael Cramer
          ... Try using Firebug in Firefox to see what s going on. If it were working properly you would see the request back to your server and a response with the XML.
          Message 4 of 14 , Jul 2, 2009
          • 0 Attachment
            --- In ydn-javascript@yahoogroups.com, "learningyui"
            > I am trying to make an AJAX call to a Perl script which returns XML using Perl's XML::Simple.
            >
            > When I run the Perl script directly from the command line, everything works and I see the XML code which I posted below.
            >
            > However, I am getting nothing back on the webpage, and when I alert the (o.repsonseXML) to the screen, I get NULL.

            Try using Firebug in Firefox to see what's going on. If it were working properly you would see the request back to your server and a response with the XML. If your URL is wrong, Firebug should show the 404. If you get a 200, but incorrect or missing data, you might be passing bad arguments to the script. If you see a 500, chances are your script is failing to set the appropriate headers (like "Content-type:").

            With Firebug you'll at least be able to see the transaction and any errors coming back from the server.

            http://getfirebug.com/

            --Mike
          • John Doe
            I am getting the proper response when looking at Firebug, and as for the headers: i am getting Content-Typetext/xml; which I believe is CORRECT. Any other
            Message 5 of 14 , Jul 2, 2009
            • 0 Attachment
              I am getting the proper response when looking at Firebug, and as for the headers: i am getting

              Content-Type text/xml;

              which I believe is CORRECT.

              Any other ideas?


              From: Michael Cramer <cramer@...>
              To: ydn-javascript@yahoogroups.com
              Sent: Thursday, July 2, 2009 11:14:37 AM
              Subject: [ydn-javascript] Re: Connection Manager

              --- In ydn-javascript@ yahoogroups. com, "learningyui"

              > I am trying to make an AJAX call to a Perl script which returns XML using Perl's XML::Simple.
              >
              > When I run the Perl script directly from the command line, everything works and I see the XML code which I posted below.
              >
              > However, I am getting nothing back on the webpage, and when I alert the (o.repsonseXML) to the screen, I get NULL.

              Try using Firebug in Firefox to see what's going on. If it were working properly you would see the request back to your server and a response with the XML. If your URL is wrong, Firebug should show the 404. If you get a 200, but incorrect or missing data, you might be passing bad arguments to the script. If you see a 500, chances are your script is failing to set the appropriate headers (like "Content-type: ").

              With Firebug you'll at least be able to see the transaction and any errors coming back from the server.

              http://getfirebug. com/

              --Mike


            • Michael Cramer
              ... Maybe try o.responseText instead of o.responseXML ? Also, console.log(o) might be helpful in your callbacks to see what YUI is getting back from the
              Message 6 of 14 , Jul 2, 2009
              • 0 Attachment
                On Thu, Jul 2, 2009 at 11:25 AM, John Doe<learningyui@...> wrote:
                > I am getting the proper response when looking at Firebug, and as for the
                > headers: i am getting
                >
                > Content-Type text/xml;
                >
                > which I believe is CORRECT.
                >
                > Any other ideas?

                Maybe try "o.responseText" instead of "o.responseXML"? Also,
                "console.log(o)" might be helpful in your callbacks to see what YUI is
                getting back from the request.

                --
                Mike Cramer
                http://www.webkist.com/
                215.769.2505 // AIM/Skype/Etc: MikeWebkist
              • John Doe
                I have tried the o.responseText and that does not really work for me - I am getting back only the most intenal leaves/data, no XML structure, and getting it
                Message 7 of 14 , Jul 2, 2009
                • 0 Attachment
                  I have tried the o.responseText and that does not really work for me - I am getting back only the most intenal leaves/data, no XML structure, and getting it all back as one long and ugly string.

                  I need to maintain the XML structure for later accessing of the data.

                  I also get:



                  From: Michael Cramer <cramer@...>
                  To: ydn-javascript@yahoogroups.com
                  Sent: Thursday, July 2, 2009 11:32:20 AM
                  Subject: Re: [ydn-javascript] Re: Connection Manager

                  On Thu, Jul 2, 2009 at 11:25 AM, John Doe<learningyui@ yahoo.com> wrote:
                  > I am getting the proper response when looking at Firebug, and as for the
                  > headers: i am getting
                  >
                  > Content-Type text/xml;
                  >
                  > which I believe is CORRECT.
                  >
                  > Any other ideas?

                  Maybe try "o.responseText" instead of "o.responseXML" ? Also,
                  "console.log( o)" might be helpful in your callbacks to see what YUI is
                  getting back from the request.

                  --
                  Mike Cramer
                  http://www.webkist. com/
                  215.769.2505 // AIM/Skype/Etc: MikeWebkist


                • Satyam
                  A single whitespace, otherwise invisible before the
                  Message 8 of 14 , Jul 2, 2009
                  • 0 Attachment
                    A single whitespace, otherwise invisible before the <?xml declaration
                    (which you don't show in the XML sample though it seems you are
                    outputting from the code) will make it fail. The <?xml processing
                    instruction should be the very first thing in the message and it has to
                    be there. Browsers often strip it before processing because browsers
                    are designed to be tolerant. JavaScript does not because it is up to
                    you to decide what to do, whether to be tolerant or not. That means
                    that those nasty whitespaces are often hard to see. Do something like

                    alert('[' + o.responseText.replace(/\s/g,'.') ); to see if there is any
                    such whitespace.

                    Satyam


                    John Doe escribió:
                    >
                    >
                    > I am getting the proper response when looking at Firebug, and as for
                    > the headers: i am getting
                    >
                    > Content-Type text/xml;
                    >
                    > which I believe is CORRECT.
                    >
                    > Any other ideas?
                    >
                    > ------------------------------------------------------------------------
                    > *From:* Michael Cramer <cramer@...>
                    > *To:* ydn-javascript@yahoogroups.com
                    > *Sent:* Thursday, July 2, 2009 11:14:37 AM
                    > *Subject:* [ydn-javascript] Re: Connection Manager
                    >
                    > --- In ydn-javascript@ yahoogroups. com
                    > <mailto:ydn-javascript%40yahoogroups.com>, "learningyui"
                    > > I am trying to make an AJAX call to a Perl script which returns XML
                    > using Perl's XML::Simple.
                    > >
                    > > When I run the Perl script directly from the command line,
                    > everything works and I see the XML code which I posted below.
                    > >
                    > > However, I am getting nothing back on the webpage, and when I alert
                    > the (o.repsonseXML) to the screen, I get NULL.
                    >
                    > Try using Firebug in Firefox to see what's going on. If it were
                    > working properly you would see the request back to your server and a
                    > response with the XML. If your URL is wrong, Firebug should show the
                    > 404. If you get a 200, but incorrect or missing data, you might be
                    > passing bad arguments to the script. If you see a 500, chances are
                    > your script is failing to set the appropriate headers (like
                    > "Content-type: ").
                    >
                    > With Firebug you'll at least be able to see the transaction and any
                    > errors coming back from the server.
                    >
                    > http://getfirebug. com/ <http://getfirebug.com/>
                    >
                    > --Mike
                    >
                    >
                    >
                    >
                    >
                    > ------------------------------------------------------------------------
                    >
                    >
                    > No virus found in this incoming message.
                    > Checked by AVG - www.avg.com
                    > Version: 8.5.375 / Virus Database: 270.13.2/2214 - Release Date: 07/02/09 05:54:00
                    >
                    >
                  • Singh, Amit IN BLR SISL
                    Hi I am using YAHOO.example.container.wait panel. But when it appears All dropdown box es are becoming invisible. Any idea to fix it. Thanks
                    Message 9 of 14 , Sep 9, 2009
                    • 0 Attachment

                      Hi

                      I am using YAHOO.example.container.wait panel. But when it appears  

                      All dropdown boxes are becoming invisible.

                      Any idea to fix it.

                      Thanks

                       

                       

                       

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