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

How can I use AJAX in overlibmws? Thanks,

Expand Messages
  • dogshasha
    I m referred here by Overlib support group. There is an AJAX plugin but I can t find any documentations about it. So please bear with me. Here is what I want
    Message 1 of 4 , Mar 1, 2008
    • 0 Attachment
      I'm referred here by Overlib support group.

      There is an AJAX plugin but I can't find any documentations about it. So
      please bear with me.

      Here is what I want to do. I like to display an image thumbnail on the
      web and show the real big-sized image by clicking on it. I think this
      concept falls into AJAX. Can someone here shed any light on how to do
      it? Thanks in advance,

      Michael
    • Foteos Macrides
      Michael, The support document for AJAX in general, and for use of the OLgetAJAX or OLpostAJAX functions via the ajaxcontentmws.js support script, is:
      Message 2 of 4 , Mar 1, 2008
      • 0 Attachment
        Michael,
         
        The support document for AJAX in general, and for use of the OLgetAJAX or OLpostAJAX functions via the ajaxcontentmws.js support script, is:
         
         
        Note that if you already are using AJAX via an equivalent function in one of the popular libraries for AJAX, e.g., prototype or mootools, you can continue using that with overlibmws popups, as also is discussed in the above support document.
         
        Also note that in addition to the Command Reference for overlibmws, a large number of support documents including the above can be accessed via:
         
         
        Note as well that you do not need to use AJAX to achieve your objective of not fetching the full-sized image specified via an img tag in the lead argument of your overlib function call during initial loading of the document.  The thumbnail will be fetched for direct display within your document while the document is being loaded, but unless you use javascript pre-loading code (see below) the full-sized image will not be fetched from your server until the first time (if ever) that the user clicks on the thumbnail (and then for any subsequent invocations of that popup, the cached, local copy of the full-sized image will be used).
         
        Be sure to indicate both the width and height of the full-sized image in the img tag so that the popup will be properly sized before the image has been fetched, rather than requiring any re-draw of the popup after the image has been received and its height and width can be read by the browser from the image's own header section.  You similarly would be wise to indicate the height and width for your thumbnail(s), to avoid any need for redraws of the document in conjunction with its initial loading.
         
        Since you are using the onclick event to invoke the popup with the full-sized image, you might wish also to include markup for invoking a descriptive popup via the onmouseover event, as discussed in the Getting Started:
         
         
        support document.  Also, be sure to structure your onclick attribute value so that it returns false, to ensure a complete fetch and loading of the full-sized image, as explained in the:
         
         
        support document.
         
        Normally, one includes pre-loading javascript code for images which will appear only in popups, as discussed and illustrated in the:
         
         
        support document.  For your presumably quite large, full-sized images, one would put a script block with the pre-loading code at the bottom of your document's body section, rather than including it in a script block in the document's head section as is done for the small images in that support document, so that the fetching of those full-size images will not commence until all other fetches associated with loading the document have been initiated (modern browsers issue and maintain up to 6 simultaneous requests to the server when the document is loading, but even so, it's a good idea to make sure requests for very large images which are used only in popups will be issued last).  All of the modern browsers start displaying the document before it has been fully loaded, and before images associated with pre-loading code have actually be fetched.  The overlibmws library in turn is structured such that its popups can be invoked as soon as the associated portions of the document are displayed, without need for the document to have as yet been fully loaded or for any of the images associated with pre-loading code to have been fetched.  So most people do include such pre-loading code, so that the images are likely to be in local cache and thus displayed promptly upon invocations -- including the first invocation -- of popups which contain images.  There is, however, a "wasted bandwidth" cost for pre-loading images which are never shown because the user did not invoke the associated popups, so if you are using a hosting service whose monthly bandwidth allotment is on the smallish side, that's a factor in deciding whether to use pre-loading for your full-sized images.
         
        Once you've set up all that, you'll likely next want to know how to give users the option to print your DHTML popups with those images.  That's explained in the:
         
         
        support document set.  And be sure to check out Manon's beautiful examples:
         
         
        of thumbnail image galleries.
         
        Fote
        --
         
        ----- Original Message -----
        From: dogshasha
        Sent: Saturday, March 01, 2008 3:21 PM
        Subject: [OLmws] How can I use AJAX in overlibmws? Thanks,

        I'm referred here by Overlib support group.

        There is an AJAX plugin but I can't find any documentations about it. So please bear with me.

        Here is what I want to do.  I like to display an image thumbnail on the web and show the real big-sized image by clicking on it. I think this concept falls into AJAX. Can someone here shed any light on how to do it? Thanks in advance,

        Michael
      • dogshasha
        Hi Fote, Thank you so much for explaining it in such details. One more question, if I m using overlib to display some simple text, images with some caption,
        Message 3 of 4 , Mar 2, 2008
        • 0 Attachment
          Hi Fote, Thank you so much for explaining it in such details. One more
          question, if I'm using overlib to display some simple text, images with
          some caption, nothing fancy, can I switch to overlibmws without having
          to change my code? Thanks,

          Best Regards,

          Michael
          --- In overlibmws@yahoogroups.com, "Foteos Macrides" <fote@...> wrote:
          >
          > Michael,
          >
          > The support document for AJAX in general, and for use of the OLgetAJAX
          or OLpostAJAX functions via the ajaxcontentmws.js support script, is:
          >
          > http://www.macridesweb.com/oltest/AJAX.html
          >
          > Note that if you already are using AJAX via an equivalent function in
          one of the popular libraries for AJAX, e.g., prototype or mootools, you
          can continue using that with overlibmws popups, as also is discussed in
          the above support document.
          >
          > Also note that in addition to the Command Reference for overlibmws, a
          large number of support documents including the above can be accessed
          via:
          >
          > http://www.macridesweb.com/oltest/
          >
          > Note as well that you do not need to use AJAX to achieve your
          objective of not fetching the full-sized image specified via an img tag
          in the lead argument of your overlib function call during initial
          loading of the document. The thumbnail will be fetched for direct
          display within your document while the document is being loaded, but
          unless you use javascript pre-loading code (see below) the full-sized
          image will not be fetched from your server until the first time (if
          ever) that the user clicks on the thumbnail (and then for any subsequent
          invocations of that popup, the cached, local copy of the full-sized
          image will be used).
          >
          > Be sure to indicate both the width and height of the full-sized image
          in the img tag so that the popup will be properly sized before the image
          has been fetched, rather than requiring any re-draw of the popup after
          the image has been received and its height and width can be read by the
          browser from the image's own header section. You similarly would be
          wise to indicate the height and width for your thumbnail(s), to avoid
          any need for redraws of the document in conjunction with its initial
          loading.
          >
          > Since you are using the onclick event to invoke the popup with the
          full-sized image, you might wish also to include markup for invoking a
          descriptive popup via the onmouseover event, as discussed in the Getting
          Started:
          >
          > http://www.macridesweb.com/oltest/STARTED.html
          >
          > support document. Also, be sure to structure your onclick attribute
          value so that it returns false, to ensure a complete fetch and loading
          of the full-sized image, as explained in the:
          >
          > http://www.macridesweb.com/oltest/ONCLICK.html
          >
          > support document.
          >
          > Normally, one includes pre-loading javascript code for images which
          will appear only in popups, as discussed and illustrated in the:
          >
          > http://www.macridesweb.com/oltest/STICKY.html
          >
          > support document. For your presumably quite large, full-sized images,
          one would put a script block with the pre-loading code at the bottom of
          your document's body section, rather than including it in a script block
          in the document's head section as is done for the small images in that
          support document, so that the fetching of those full-size images will
          not commence until all other fetches associated with loading the
          document have been initiated (modern browsers issue and maintain up to 6
          simultaneous requests to the server when the document is loading, but
          even so, it's a good idea to make sure requests for very large images
          which are used only in popups will be issued last). All of the modern
          browsers start displaying the document before it has been fully loaded,
          and before images associated with pre-loading code have actually be
          fetched. The overlibmws library in turn is structured such that its
          popups can be invoked as soon as the associated portions of the document
          are displayed, without need for the document to have as yet been fully
          loaded or for any of the images associated with pre-loading code to have
          been fetched. So most people do include such pre-loading code, so that
          the images are likely to be in local cache and thus displayed promptly
          upon invocations -- including the first invocation -- of popups which
          contain images. There is, however, a "wasted bandwidth" cost for
          pre-loading images which are never shown because the user did not invoke
          the associated popups, so if you are using a hosting service whose
          monthly bandwidth allotment is on the smallish side, that's a factor in
          deciding whether to use pre-loading for your full-sized images.
          >
          > Once you've set up all that, you'll likely next want to know how to
          give users the option to print your DHTML popups with those images.
          That's explained in the:
          >
          > http://www.macridesweb.com/oltest/PRINT.html
          >
          > support document set. And be sure to check out Manon's beautiful
          examples:
          >
          > http://www.purplespirit.com/overlib/ol_print.htm
          >
          > of thumbnail image galleries.
          >
          > Fote
          > --
          >
          > ----- Original Message -----
          > From: dogshasha
          > To: overlibmws@yahoogroups.com
          > Sent: Saturday, March 01, 2008 3:21 PM
          > Subject: [OLmws] How can I use AJAX in overlibmws? Thanks,
          >
          >
          > I'm referred here by Overlib support group.
          >
          > There is an AJAX plugin but I can't find any documentations about
          it. So please bear with me.
          >
          > Here is what I want to do. I like to display an image thumbnail on
          the web and show the real big-sized image by clicking on it. I think
          this concept falls into AJAX. Can someone here shed any light on how to
          do it? Thanks in advance,
          >
          > Michael
          >
        • Foteos Macrides
          Michael, I abandoned the Bosrup version of overlib and continued on my own with overlibmws way back in 2002. At this point there is almost no overlap in the
          Message 4 of 4 , Mar 2, 2008
          • 0 Attachment
            Michael,
             
            I abandoned the Bosrup version of overlib and continued on my own with overlibmws way back in 2002.  At this point there is almost no overlap in the actual code for the two versions, but the most commonly used command names for the basic commands in the core module for the two versions (overlibmws.js versus overlib.js) are for the most part the same.  So if you are just getting started and only using the core module, you should be able to switch which one you import and not have any problem.  If you had been using one of the commands whose names differ (say, FOO), you'll get an error message that FOO is undefined, in which case you can post what that name is, and I can tell you what to use for overlibmws.
             
            But the Bosrup version similarly does not fetch the image for the img tag in the lead argument before the user invokes the popup unless you've added code for pre-loading that image, so you need not switch versions for that reason alone.
             
            Fote
            --
             
            ----- Original Message -----
            From: dogshasha
            Sent: Sunday, March 02, 2008 2:25 PM
            Subject: Re: [OLmws] How can I use AJAX in overlibmws? Thanks,

            Hi Fote, Thank you so much for explaining it in such details. One more question, if I'm using overlib to display some simple text, images with some caption,  nothing fancy, can I switch to overlibmws without having to change my code? Thanks,

            Best Regards,

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