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

Requests for syncRequest and null callbacks

Expand Messages
  • Blair Zajac
    Hello, Thanks for making YUI available. I m working on using the code in my web app and have some initial comments. My web app is hosted on a removable drive
    Message 1 of 7 , Apr 2 1:00 PM
    • 0 Attachment
      Hello,

      Thanks for making YUI available.

      I'm working on using the code in my web app and have some initial comments.

      My web app is hosted on a removable drive and the user of the app inserts the
      drive and runs a launcher, which starts Apache and MySQL off the drive.

      The requests are:

      1) The launcher needs to keep track of the number of windows currently viewing
      the app so it knows when it's safe to shut down Apache and MySQL.

      In this case, I don't care about using a callback function and would like to set
      it to null, which seems like a reasonable thing to do, but
      handleTransactionResponse(), it assumes that the callback is not null.

      Could it check for a null callback? Right now I'm passing in a do nothing
      function, which seems like a waste.

      2) On my window.unload event, I need to send off a XHR to the web app. In this
      case, I would like a synchronous event and not an asynchronous event to make
      sure that the request is sent off before the window is closed.

      Could a syncRequest method be added.

      Thanks,
      Blair

      --
      Blair Zajac, Ph.D.
      CTO, OrcaWare Technologies
      <blair@...>
      Subversion training, consulting and support
      http://www.orcaware.com/svn/
    • Ehsan Sadeghi
      can anyone suggest a way to send IM from a web page? Blair Zajac wrote: Hello, Thanks for making YUI available. I m working on using the
      Message 2 of 7 , Apr 2 1:52 PM
      • 0 Attachment
        can anyone suggest a way to send IM from a web page?


        Blair Zajac <blair@...> wrote:
        Hello,

        Thanks for making YUI available.

        I'm working on using the code in my web app and have some initial comments.

        My web app is hosted on a removable drive and the user of the app inserts the
        drive and runs a launcher, which starts Apache and MySQL off the drive.

        The requests are:

        1) The launcher needs to keep track of the number of windows currently viewing
        the app so it knows when it's safe to shut down Apache and MySQL.

        In this case, I don't care about using a callback function and would like to set
        it to null, which seems like a reasonable thing to do, but
        handleTransactionResponse(), it assumes that the callback is not null.

        Could it check for a null callback?  Right now I'm passing in a do nothing
        function, which seems like a waste.

        2) On my window.unload event, I need to send off a XHR to the web app.  In this
        case, I would like a synchronous event and not an asynchronous event to make
        sure that the request is sent off before the window is closed.

        Could a syncRequest method be added.

        Thanks,
        Blair

        --
        Blair Zajac, Ph.D.
        CTO, OrcaWare Technologies
        <blair@...>
        Subversion training, consulting and support
        http://www.orcaware.com/svn/

      • Charles
        can anyone suggest a way to send IM from a web page? Most likely, your page will communicate with a server that does the actual communication. Following is a
        Message 3 of 7 , Apr 2 3:11 PM
        • 0 Attachment

          can anyone suggest a way to send IM from a web page?

           

          Most likely, your page will communicate with a server that does the actual communication. Following is a URL to sample code that works with AIM, and a URL to libraries that let you talk to GTalk/Jabber/XMPP clients.

           

          http://www.everything2.com/index.pl?node_id=1683074

          http://www.jabber.org/software/libraries.shtml

           

          See Meebo for an example of a site that does this for all popular protocols.

           

          — Charles

           


          From: ydn-javascript@yahoogroups.com [mailto: ydn-javascript@yahoogroups.com ] On Behalf Of Ehsan Sadeghi
          Sent: Sunday, April 02, 2006 1:52 PM
          To: ydn-javascript@yahoogroups.com
          Subject: [ydn-javascript] Send Message from web site

           

          can anyone suggest a way to send IM from a web page?

           

        • Charles
          Is anyone here working on an auto-suggest/auto-search component for YUI? If so, I d be interested in working with you on this. Thanks, - Charles
          Message 4 of 7 , Apr 2 3:14 PM
          • 0 Attachment

            Is anyone here working on an auto-suggest/auto-search component for YUI?

             

            If so, I’d be interested in working with you on this.

             

            Thanks,

             

            — Charles

             

          • Charles
            Hello, I m feeling stupid. Why doesn t this work? var pos = new YAHOO.util.Point(100, 100); YAHOO.util.Dom.setXY( searchResults , pos); I am able to set the XY
            Message 5 of 7 , Apr 2 4:20 PM
            • 0 Attachment

              Hello,

               

              I’m feeling stupid. Why doesn’t this work?

               

                    var pos = new YAHOO.util.Point(100, 100);

                    YAHOO.util.Dom.setXY('searchResults', pos);

               

              I am able to set the XY of ‘searchResults’ if I first get the XY of another element.

               

              — Charles

               

            • Matt Sweeney
              Hi Charles, YAHOO.util.Point is a subclass of YAHOO.util.Region, which is an object with the properties top, right, bottom, left . In the case of a Point,
              Message 6 of 7 , Apr 2 4:32 PM
              • 0 Attachment
                Hi Charles,

                YAHOO.util.Point is a subclass of YAHOO.util.Region, which is an object with the properties "top, right, bottom, left".  In the case of a Point, left == right, and top == bottom.

                YAHOO.util.Dom.setXY accepts an array comprised of X and Y coordinates.

                You could either do:
                YAHOO.util.Dom.setXY('searchResults', [100, 100]);
                or
                var pos = new YAHOO.util.Point(100, 100);
                YAHOO.util.Dom.setXY('searchResults', [pos.left, pos.top]);

                This brings up a good point, though.  Perhaps setXY should also accept an object with "top, left" properties.

                Matt

                Charles wrote:

                Hello,

                 

                I’m feeling stupid. Why doesn’t this work?

                 

                      var pos = new YAHOO.util.Point(100, 100);

                      YAHOO.util.Dom.setXY('searchResults', pos);

                 

                I am able to set the XY of ‘searchResults’ if I first get the XY of another element.

                 

                — Charles

                 



              • Charles
                Thanks, Matt! This brings up a good point, though. Perhaps setXY should also accept an object with top, left properties. Yeah, it seemed reasonable to
                Message 7 of 7 , Apr 3 1:32 PM
                • 0 Attachment

                  Thanks, Matt!

                   

                  This brings up a good point, though.  Perhaps setXY should also accept an object with "top, left" properties.

                   

                  Yeah, it seemed reasonable to expect setXY to accept a Point directly.

                   

                  (I’ll probably have several similarly-silly questions over the next couple of months, but hope to be able to contribute answers soon…)

                   

                  — Charles

                   


                  From: ydn-javascript@yahoogroups.com [mailto:ydn-javascript@yahoogroups.com] On Behalf Of Matt Sweeney
                  Sent: Sunday, April 02, 2006 4:32 PM
                  To: ydn-javascript@yahoogroups.com
                  Subject: Re: [ydn-javascript] YAHOO.util.Point question

                   

                  Hi Charles,

                  YAHOO.util.Point is a subclass of YAHOO.util.Region, which is an object with the properties "top, right, bottom, left".  In the case of a Point, left == right, and top == bottom.

                  YAHOO.util.Dom.setXY accepts an array comprised of X and Y coordinates.

                  You could either do:
                  YAHOO.util.Dom.setXY('searchResults', [100, 100]);
                  or
                  var pos = new YAHOO.util.Point(100, 100);
                  YAHOO.util.Dom.setXY('searchResults', [pos.left, pos.top]);

                  This brings up a good point, though.  Perhaps setXY should also accept an object with "top, left" properties.

                  Matt

                  Charles wrote:

                  Hello,

                   

                  I’m feeling stupid. Why doesn’t this work?

                   

                        var pos = new YAHOO.util.Point(100, 100);

                        YAHOO.util.Dom.setXY('searchResults', pos);

                   

                  I am able to set the XY of ‘searchResults’ if I first get the XY of another element.

                   

                  — Charles

                   

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