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

OverLib syntax error?

Expand Messages
  • smotrinamenya
    This works correctly:
    Message 1 of 4 , Aug 8, 2011

      This works correctly:

      <area shape="rect" coords="650,117,660,127" href="javascript:void(0);"onmouseover="return overlib('<span class=nrm><b>Note: Completed</b><hr><b>Start: </b>9/26/2011<br><b>Finish: </b>10/7/2011</span>', CAPTION, 'Milestone 3103');" onmouseout="return nd();"onmousemove ="self.status='Milestone 3103'; return true"'></A>

      but this version, which embeds a table, does not (the table contents and all of the OL code that follows the table is displayed at the bottom of the html page):

      <area shape="rect" coords="344,117,354,127" href="javascript:void(0);"onmouseover="return overlib('<table><tr><td>5pxred</td></tr></table>', CAPTION, 'Milestone 3091');" onmouseout="return nd();"onmousemove ="self.status='Milestone 3091'; return true"'></A>

      I can't see the difference between the two, but since the html is displaying the OL code it obviously doesn't know what to do with it. I have stared at this for hours and I can't spot the error (I have another application that embeds OL code with html tables in JavaScript functions and it works correctly; the html for the embedded tables there is identical to the table html in the problem application).

      Any assistance would be appreciated. Thanks

    • reboughner0718
      ... Your parentheses and single parentheses are unmatched. You ve got 12 ` ` and seven` ` in your statement. I believe the offender is the last single quote
      Message 2 of 4 , Aug 8, 2011
        --- In overlib@yahoogroups.com, "smotrinamenya" <smotrinamenya@...> wrote:
        >
        >
        > This works correctly:
        >
        > <area shape="rect" coords="650,117,660,127"
        > href="javascript:void(0);"onmouseover="return overlib('<span
        > class=nrm><b>Note: Completed</b><hr><b>Start:
        > </b>9/26/2011<br><b>Finish: </b>10/7/2011</span>', CAPTION, 'Milestone
        > 3103');" onmouseout="return nd();"onmousemove ="self.status='Milestone
        > 3103'; return true"'></A>
        >
        > but this version, which embeds a table, does not (the table contents and
        > all of the OL code that follows the table is displayed at the bottom of
        > the html page):
        >
        > <area shape="rect" coords="344,117,354,127"
        > href="javascript:void(0);"onmouseover="return
        > overlib('<table><tr><td>5pxred</td></tr></table>', CAPTION, 'Milestone
        > 3091');" onmouseout="return nd();"onmousemove ="self.status='Milestone
        > 3091'; return true"'></A>
        >
        > I can't see the difference between the two, but since the html is
        > displaying the OL code it obviously doesn't know what to do with it. I
        > have stared at this for hours and I can't spot the error (I have another
        > application that embeds OL code with html tables in JavaScript functions
        > and it works correctly; the html for the embedded tables there is
        > identical to the table html in the problem application).
        >
        > Any assistance would be appreciated. Thanks
        >

        Your parentheses and single parentheses are unmatched. You've got 12 `"` and seven`'` in your statement. I believe the offender is the last single quote after return true. Remove that one and see if things improve.
      • smotrinamenya
        ... Milestone ... = self.status= Milestone ... and ... of ... Milestone ... = self.status= Milestone ... I ... another ... functions ... ` ` and seven` ` in
        Message 3 of 4 , Aug 9, 2011


          --- In overlib@yahoogroups.com, "reboughner0718" <rboughner1@...> wrote:
          >
          >
          >
          > --- In overlib@yahoogroups.com, "smotrinamenya" smotrinamenya@ wrote:
          > >
          > >
          > > This works correctly:
          > >
          > > <area shape="rect" coords="650,117,660,127"
          > > href="javascript:void(0);"onmouseover="return overlib('<span
          > > class=nrm><b>Note: Completed</b><hr><b>Start:
          > > </b>9/26/2011<br><b>Finish: </b>10/7/2011</span>', CAPTION, 'Milestone
          > > 3103');" onmouseout="return nd();"onmousemove ="self.status='Milestone
          > > 3103'; return true"'></A>
          > >
          > > but this version, which embeds a table, does not (the table contents and
          > > all of the OL code that follows the table is displayed at the bottom of
          > > the html page):
          > >
          > > <area shape="rect" coords="344,117,354,127"
          > > href="javascript:void(0);"onmouseover="return
          > > overlib('<table><tr><td>5pxred</td></tr></table>', CAPTION, 'Milestone
          > > 3091');" onmouseout="return nd();"onmousemove ="self.status='Milestone
          > > 3091'; return true"'></A>
          > >
          > > I can't see the difference between the two, but since the html is
          > > displaying the OL code it obviously doesn't know what to do with it. I
          > > have stared at this for hours and I can't spot the error (I have another
          > > application that embeds OL code with html tables in JavaScript functions
          > > and it works correctly; the html for the embedded tables there is
          > > identical to the table html in the problem application).
          > >
          > > Any assistance would be appreciated. Thanks
          > >
          >
          > Your parentheses and single parentheses are unmatched. You've got 12 `"` and seven`'` in your statement. I believe the offender is the last single quote after return true. Remove that one and see if things improve.
          >

          Robert,
          Fixing the ["] and ['] didn't fix the problem, but with some experimentation I have found something pretty strange. The following works correctly:

          <area shape="rect" coords="274,112,284,122" href="javascript:void(0);"onmouseover="return overlib('<table><tr><td>THIS IS IN A TABLE</td></tr></table>', CAPTION, 'Milestone 4227');" onmouseout="return nd();" onmousemove ="self.status='Milestone 4227'; return true'></A>

          but when I use <td class="olred"> instead of <td> it no longer works (yes, the stylesheet is referenced in the page).

          What is strange is that the return overlib('<table><tr>td class="olred"....   works correctly when I call it in a Javascript function in a different set of pages. So I'm puzzled by the fact that a construct that works in a JS function is not working in a direct OverLib call. Why would adding a CSS class reference cause an OL call to fail in one instance but not another??

          Thanks

          Dave


           

        • reboughner0718
          ... I would have to see the actual page before I could comment further. Besides why don t you just use the TEXTFONTCLASS command. My first instinct is to say
          Message 4 of 4 , Aug 9, 2011
            --- In overlib@yahoogroups.com, "smotrinamenya" <smotrinamenya@...> wrote:
            >
            >
            >
            > --- In overlib@yahoogroups.com, "reboughner0718" <rboughner1@> wrote:
            > >
            > >
            > >
            > > --- In overlib@yahoogroups.com, "smotrinamenya" smotrinamenya@ wrote:
            > > >
            > > >
            > > > This works correctly:
            > > >
            > > > <area shape="rect" coords="650,117,660,127"
            > > > href="javascript:void(0);"onmouseover="return overlib('<span
            > > > class=nrm><b>Note: Completed</b><hr><b>Start:
            > > > </b>9/26/2011<br><b>Finish: </b>10/7/2011</span>', CAPTION,
            > 'Milestone
            > > > 3103');" onmouseout="return nd();"onmousemove
            > ="self.status='Milestone
            > > > 3103'; return true"'></A>
            > > >
            > > > but this version, which embeds a table, does not (the table contents
            > and
            > > > all of the OL code that follows the table is displayed at the bottom
            > of
            > > > the html page):
            > > >
            > > > <area shape="rect" coords="344,117,354,127"
            > > > href="javascript:void(0);"onmouseover="return
            > > > overlib('<table><tr><td>5pxred</td></tr></table>', CAPTION,
            > 'Milestone
            > > > 3091');" onmouseout="return nd();"onmousemove
            > ="self.status='Milestone
            > > > 3091'; return true"'></A>
            > > >
            > > > I can't see the difference between the two, but since the html is
            > > > displaying the OL code it obviously doesn't know what to do with it.
            > I
            > > > have stared at this for hours and I can't spot the error (I have
            > another
            > > > application that embeds OL code with html tables in JavaScript
            > functions
            > > > and it works correctly; the html for the embedded tables there is
            > > > identical to the table html in the problem application).
            > > >
            > > > Any assistance would be appreciated. Thanks
            > > >
            > >
            > > Your parentheses and single parentheses are unmatched. You've got 12
            > `"` and seven`'` in your statement. I believe the offender is the last
            > single quote after return true. Remove that one and see if things
            > improve.
            > >
            >
            > Robert,
            > Fixing the ["] and ['] didn't fix the problem, but with some
            > experimentation I have found something pretty strange. The following
            > works correctly:
            >
            > <area shape="rect" coords="274,112,284,122"
            > href="javascript:void(0);"onmouseover="return
            > overlib('<table><tr><td>THIS IS IN A TABLE</td></tr></table>', CAPTION,
            > 'Milestone 4227');" onmouseout="return nd();" onmousemove
            > ="self.status='Milestone 4227'; return true'></A>
            >
            > but when I use <td class="olred"> instead of <td> it no longer works
            > (yes, the stylesheet is referenced in the page).
            >
            > What is strange is that the return overlib('<table><tr>td
            > class="olred".... works correctly when I call it in a Javascript
            > function in a different set of pages. So I'm puzzled by the fact that a
            > construct that works in a JS function is not working in a direct OverLib
            > call. Why would adding a CSS class reference cause an OL call to fail in
            > one instance but not another??
            >
            > Thanks
            >
            > Dave
            >

            I would have to see the actual page before I could comment further. Besides why don't you just use the TEXTFONTCLASS command. My first instinct is to say that your parentheses are unbalanced is what is causing the problem but I would need to see the actual page to confirm this. (Note, the sequence is this onmouseover = "return overlib('...<td class="olred">...');" and the innermost " should be escaped by putting a backslash before it.)
          Your message has been successfully submitted and would be delivered to recipients shortly.