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

Re: [OLmws] AJAX content only appears after second mouseover

Expand Messages
  • TBoyko
    The website can be viewed here: http://www.lasplash.com/test_tb.php My call to OLgetAJAX boils down to this (first url truncated to get rid of excess php
    Message 1 of 5 , Mar 1, 2007
    • 0 Attachment
      The website can be viewed here:

      http://www.lasplash.com/test_tb.php

      My call to OLgetAJAX boils down to this (first url truncated to get
      rid of excess php escape characters and such):

      <a href="/calendar/cal_day.php" onmouseover="return
      OLgetAJAX('/calendar/minical_ajax_day.php?', OLcmdMinical(), 200);"
      onmouseout="OLclearAJAX(); nd();">

      You also may be interested in this:

      <script type="text/javascript">
      function OLcmdMinical(){
      return overlib( OLresponseAJAX, FGCOLOR,'white',
      TEXTSIZE,'1',WIDTH,'120',VAUTO,HAUTO);
      }
      </script>

      Interestingly enough, I do have the parentheses in the second argument
      of the OLgetAJAX call. If I remove the parentheses, however, a popup
      doesn't even appear. I also tried removing the parentheses and adding
      single quotes around the name of the function, thinking that it might
      have wanted a string. This didn't work either.

      Any ideas? Thanks for the support so far!





      --- In overlibmws@yahoogroups.com, "Foteos Macrides" <fote@...> wrote
      >
      > I modified the ajaxcontentmws.js support script to yield a graceful
      failure and an alert that explains the failure if the 2nd argument of
      an OLgetAJAX or OLpostAJAX call is not a function reference (i.e.,
      just the name of the function without parenthesis) nor an inline
      function (i.e., defined within the 2nd argument as function(){. . .}
      ). The updated script is in an updated overlibmws.zip distribution
      available via:
      >
      > http://www.macridesweb.com/oltest/
      >
      > Fote
      > --
      >
      > ----- Original Message -----
      > From: Foteos Macrides
      > To: overlibmws@yahoogroups.com
      > Sent: Tuesday, February 27, 2007 9:59 PM
      > Subject: Re: [OLmws] AJAX content only appears after second mouseover
      >
      >
      > Could you provide a URL to a test document with this problem so
      that we can see the markup which your PHP is generating and try to
      diagnose the problem?
      >
      > Note that a similar problem discussed recently:
      >
      > http://tech.groups.yahoo.com/group/overlibmws/message/820
      >
      > was due to including parentheses in the second argument of the
      OLgetAJAX call. That should be a function reference, i.e., only the
      name of the function, without any parentheses.
      >
      > Fote
      > --
      >
      > ----- Original Message -----
      > From: TBoyko
      > To: overlibmws@yahoogroups.com
      > Sent: Tuesday, February 27, 2007 6:55 PM
      > Subject: [OLmws] AJAX content only appears after second mouseover
      >
      >
      > I am using a PHP calendar that uses OverLib to show the events
      of a particular date
      > depending upon what date the user's mouse is hovering over.
      Before, this was done without
      > AJAX, but the calendar loads too slowly now, so I replaced each
      overlib call with OLgetAJAX()
      > calls. The call requests content from another php page and then
      loads it to the div.
      >
      > Here is my problem:
      >
      > When I mouse over any date upon page load, the first date
      results in my overlib window
      > being displayed, but being empty. By hovering over any other
      date after this one, and even
      > including this initial date, the content loads correctly. Upon
      refreshing the page and
      > hovering over a date again, the first trial still results in a
      blank div.
      >
      > Does anyone have any idea why this happens, and only on the
      first attempt? Using the error
      > console in Firefox doesn't yield any useful hints.
      >
      > Thanks!
      >
    • Foteos Macrides
      First, you should believe me that the 2nd argument of the OLgetAJAX call must be the function reference, and then act on that belief. :
      Message 2 of 5 , Mar 1, 2007
      • 0 Attachment
        First, you should believe me that the 2nd argument of the OLgetAJAX call must be the function reference, and then act on that belief. :<)  In this case, the 2nd argument must be OLcmdMinical -- without parentheses and without quotation marks.
         
        Second, you need to get rid of code that is still there from when you were using the Bosrup version.  You presently are importing both its core module and the overlibmws core module.  So get rid of the script block which is importing:  src="/calendar/overlib_test.js"
         
        Third, remove your declaration of the overDiv positioned div.  That must be a direct child of the body element, but your php is doing a document.write which makes it end up as the child of another positioned div -- about as far from being a direct child of the body as you can get.  If you don't declare the overDiv positioned div, then the overlibmws core module will create it automatically -- and properly as a direct child of the body element.
         
        Those three things should get the popups working as you intend (so do them, and see if that's so  :<).  Thereafter, you would be wise to fix up your php so that all of the script blocks associated with overlib popups are being placed in the head section, instead of in the body, where your php presently is placing them.  Also you would be wise to submit the:
         
         
        URL to a validator, e.g.:
         
         
        and start working on getting your php to generate more nearly valid markup.
         
        Feel free to post here again if you have any more problems with the popups.
         
        Fote
        --
         
        ----- Original Message -----
        From: TBoyko
        Sent: Thursday, March 01, 2007 7:06 PM
        Subject: Re: [OLmws] AJAX content only appears after second mouseover

        The website can be viewed here:

        http://www.lasplash.com/test_tb.php

        My call to OLgetAJAX boils down to this (first url truncated to get rid of excess php escape characters and such):

        <a
         href="/calendar/cal_day.php"
         onmouseover="return OLgetAJAX('/calendar/minical_ajax_day.php?', OLcmdMinical(), 200);"
         onmouseout="OLclearAJAX(); nd();">

        You also may be interested in this:

        <script type="text/javascript">
        function OLcmdMinical(){
         return overlib(OLresponseAJAX, FGCOLOR,'white', TEXTSIZE,'1', WIDTH,'120', VAUTO, HAUTO);
        }
        </script>

        Interestingly enough, I do have the parentheses in the second argument of the OLgetAJAX call.  If I remove the parentheses, however, a popup doesn't even appear.  I also tried removing the parentheses and adding single quotes around the name of the function, thinking that it might have wanted a string.  This didn't work either.

        Any ideas?  Thanks for the support so far!

        --- In overlibmws@yahoogroups.com, "Foteos Macrides" <fote@...> wrote
        >
        > I modified the ajaxcontentmws.js support script to yield a graceful
        failure and an alert that explains the failure if the 2nd argument of
        an OLgetAJAX or OLpostAJAX call is not a function reference (i.e.,
        just the name of the function without parenthesis) nor an inline
        function (i.e., defined within the 2nd argument as function(){. . .}
        ).  The updated script is in an updated overlibmws.zip distribution
        available via:
        >
        > http://www.macridesweb.com/oltest/
        >
        > Fote
        > --
        >
        >   ----- Original Message -----
        >   From: Foteos Macrides
        >   To: overlibmws@yahoogroups.com
        >   Sent: Tuesday, February 27, 2007 9:59 PM
        >   Subject: Re: [OLmws] AJAX content only appears after second mouseover
        >
        >
        >   Could you provide a URL to a test document with this problem so
        that we can see the markup which your PHP is generating and try to
        diagnose the problem?
        >
        >   Note that a similar problem discussed recently:
        >
        >   http://tech.groups.yahoo.com/group/overlibmws/message/820
        >
        >   was due to including parentheses in the second argument of the
        OLgetAJAX call.  That should be a function reference, i.e., only the
        name of the function, without any parentheses.
        >
        >   Fote
        >   --
        >
        >     ----- Original Message -----
        >     From: TBoyko
        >     To: overlibmws@yahoogroups.com
        >     Sent: Tuesday, February 27, 2007 6:55 PM
        >     Subject: [OLmws] AJAX content only appears after second mouseover
        >
        >
        >     I am using a PHP calendar that uses OverLib to show the events
        of a particular date
        >     depending upon what date the user's mouse is hovering over.
        Before, this was done without
        >     AJAX, but the calendar loads too slowly now, so I replaced each
        overlib call with OLgetAJAX()
        >     calls.  The call requests content from another php page and then
        loads it to the div. 
        >
        >     Here is my problem:
        >
        >     When I mouse over any date upon page load, the first date
        results in my overlib window
        >     being displayed, but being empty.  By hovering over any other
        date after this one, and even
        >     including this initial date, the content loads correctly.  Upon
        refreshing the page and
        >     hovering over a date again, the first trial still results in a
        blank div. 
        >
        >     Does anyone have any idea why this happens, and only on the
        first attempt?  Using the error
        >     console in Firefox doesn't yield any useful hints.
        >
        >     Thanks!
      • TBoyko
        Thanks so much for your help. Following this fixed my problem. In regards to validation, I completely agree. The site is essentially spaghetti code at this
        Message 3 of 5 , Mar 2, 2007
        • 0 Attachment
          Thanks so much for your help. Following this fixed my problem. In regards to validation,
          I completely agree. The site is essentially spaghetti code at this point, but a new
          framework is supposed to be in development that will take care of this.

          Thanks again!


          --- In overlibmws@yahoogroups.com, "Foteos Macrides" <fote@...> wrote:
          >
          > First, you should believe me that the 2nd argument of the OLgetAJAX call must be the
          function reference, and then act on that belief. :<) In this case, the 2nd argument must be
          OLcmdMinical -- without parentheses and without quotation marks.
          >
          > Second, you need to get rid of code that is still there from when you were using the
          Bosrup version. You presently are importing both its core module and the overlibmws
          core module. So get rid of the script block which is importing: src="/calendar/
          overlib_test.js"
          >
          > Third, remove your declaration of the overDiv positioned div. That must be a direct
          child of the body element, but your php is doing a document.write which makes it end up
          as the child of another positioned div -- about as far from being a direct child of the body
          as you can get. If you don't declare the overDiv positioned div, then the overlibmws core
          module will create it automatically -- and properly as a direct child of the body element.
          >
          > Those three things should get the popups working as you intend (so do them, and see if
          that's so :<). Thereafter, you would be wise to fix up your php so that all of the script
          blocks associated with overlib popups are being placed in the head section, instead of in
          the body, where your php presently is placing them. Also you would be wise to submit
          the:
          >
          > http://www.lasplash.com/test_tb.php
          >
          > URL to a validator, e.g.:
          >
          > http://validator.w3.org/
          >
          > and start working on getting your php to generate more nearly valid markup.
          >
          > Feel free to post here again if you have any more problems with the popups.
          >
          > Fote
          > --
          >
          > ----- Original Message -----
          > From: TBoyko
          > To: overlibmws@yahoogroups.com
          > Sent: Thursday, March 01, 2007 7:06 PM
          > Subject: Re: [OLmws] AJAX content only appears after second mouseover
          >
          >
          > The website can be viewed here:
          >
          > http://www.lasplash.com/test_tb.php
          >
          > My call to OLgetAJAX boils down to this (first url truncated to get rid of excess php
          escape characters and such):
          >
          > <a
          > href="/calendar/cal_day.php"
          > onmouseover="return OLgetAJAX('/calendar/minical_ajax_day.php?', OLcmdMinical(),
          200);"
          > onmouseout="OLclearAJAX(); nd();">
          >
          > You also may be interested in this:
          >
          > <script type="text/javascript">
          > function OLcmdMinical(){
          > return overlib(OLresponseAJAX, FGCOLOR,'white', TEXTSIZE,'1', WIDTH,'120', VAUTO,
          HAUTO);
          > }
          > </script>
          >
          > Interestingly enough, I do have the parentheses in the second argument of the
          OLgetAJAX call. If I remove the parentheses, however, a popup doesn't even appear. I also
          tried removing the parentheses and adding single quotes around the name of the function,
          thinking that it might have wanted a string. This didn't work either.
          >
          > Any ideas? Thanks for the support so far!
          >
          > --- In overlibmws@yahoogroups.com, "Foteos Macrides" <fote@> wrote
          > >
          > > I modified the ajaxcontentmws.js support script to yield a graceful
          > failure and an alert that explains the failure if the 2nd argument of
          > an OLgetAJAX or OLpostAJAX call is not a function reference (i.e.,
          > just the name of the function without parenthesis) nor an inline
          > function (i.e., defined within the 2nd argument as function(){. . .}
          > ). The updated script is in an updated overlibmws.zip distribution
          > available via:
          > >
          > > http://www.macridesweb.com/oltest/
          > >
          > > Fote
          > > --
          > >
          > > ----- Original Message -----
          > > From: Foteos Macrides
          > > To: overlibmws@yahoogroups.com
          > > Sent: Tuesday, February 27, 2007 9:59 PM
          > > Subject: Re: [OLmws] AJAX content only appears after second mouseover
          > >
          > >
          > > Could you provide a URL to a test document with this problem so
          > that we can see the markup which your PHP is generating and try to
          > diagnose the problem?
          > >
          > > Note that a similar problem discussed recently:
          > >
          > > http://tech.groups.yahoo.com/group/overlibmws/message/820
          > >
          > > was due to including parentheses in the second argument of the
          > OLgetAJAX call. That should be a function reference, i.e., only the
          > name of the function, without any parentheses.
          > >
          > > Fote
          > > --
          > >
          > > ----- Original Message -----
          > > From: TBoyko
          > > To: overlibmws@yahoogroups.com
          > > Sent: Tuesday, February 27, 2007 6:55 PM
          > > Subject: [OLmws] AJAX content only appears after second mouseover
          > >
          > >
          > > I am using a PHP calendar that uses OverLib to show the events
          > of a particular date
          > > depending upon what date the user's mouse is hovering over.
          > Before, this was done without
          > > AJAX, but the calendar loads too slowly now, so I replaced each
          > overlib call with OLgetAJAX()
          > > calls. The call requests content from another php page and then
          > loads it to the div.
          > >
          > > Here is my problem:
          > >
          > > When I mouse over any date upon page load, the first date
          > results in my overlib window
          > > being displayed, but being empty. By hovering over any other
          > date after this one, and even
          > > including this initial date, the content loads correctly. Upon
          > refreshing the page and
          > > hovering over a date again, the first trial still results in a
          > blank div.
          > >
          > > Does anyone have any idea why this happens, and only on the
          > first attempt? Using the error
          > > console in Firefox doesn't yield any useful hints.
          > >
          > > Thanks!
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.