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

Re: Calendar"dual fancy" from old version problem firefox

Expand Messages
  • jacmgr
    Not sure how to post a proper link, make sure the link is http://www.jhinline.com/apitest/xmltest/yahoo/examples/calendar/ PLUS THE FOLLOWING
    Message 1 of 5 , Apr 1 6:50 PM
      Not sure how to post a proper link, make sure the link is

      http://www.jhinline.com/apitest/xmltest/yahoo/examples/calendar/

      PLUS THE FOLLOWING

      default_2up/index.php?pcode=demo100
    • jacmgr
      Here is a better link to my problem. You can see that the two calendars interact and work properly in IE, but in Firefox they have problem. I converted this
      Message 2 of 5 , Apr 3 5:28 PM
        Here is a better link to my problem. You can see that the two
        calendars interact and work properly in IE, but in Firefox they have
        problem. I converted this example from the old UI to the latest
        UI. I don't know enough about JS, so I hope you can help!! You can
        do a view source to see all the code.

        http://tinyurl.com/2wqc2a
        or
        http://jhinline.com/apitest/xmltest/yahoo/examples/calendar/default_2
        up/index.php?pcode=demo100

        Thankyou
        John

        --- In ydn-javascript@yahoogroups.com, "jacmgr" <jacmgr@...> wrote:
        >
        > I previously used the old Calendar UI. I recently upgraded. In
        > particular I tested all the examples of the old UI with me
        updating to
        > the new libraries. I don't know enough about JS but I got all of
        them
        > working. They all work in IE and FireFox except the old
        example "DUAL
        > FANCY". (This example doesn't exist for the latest UI!) It can't
        find
        > the var "this.dates". IE seems to find it I guess.
        >
        > Here is link. I believe I implemented new version correctly.
        >
        http://www.jhinline.com/apitest/xmltest/yahoo/examples/calendar/defau
        lt
        > _2up/index.php?pcode=demo100
        >
        > Thankx in advance!
        > John Del Ferro
        >
      • Satyen Desai
        Hi John, The problem is not really Calendar related, but the way you are accessing the dates object. Based on a cursory glance of your code, it seems like
        Message 3 of 5 , Apr 3 6:32 PM
          Hi John,

          The problem is not really Calendar related, but the way you are
          accessing the "dates" object.

          Based on a cursory glance of your code, it seems like you'd like to
          get hold of the FORM you have on your page which has name="dates",
          id="dates", and you're using "this.dates" to refer to it.

          "this.dates" will not work in FF, since "this" refers to the window.

          In fact it isn't really the proper way to access the form in IE
          either, but only works because IE creates a reference to DOM
          elements with IDs (in general) as window level variables

          You should use the document object to retrieve the form and it's
          elements ( document.forms["dates"] OR document.forms[0] OR
          document.dates ) or retrieve the elements using YAHOO.util.Dom.get
          ("dates")

          Hope that helps,
          Satyen
        • jacmgr
          Satyen, Thankyou very much. I added the reference to the form. It all works fine now in BOTH IE and FF. I appreciate your detailed response and the chance to
          Message 4 of 5 , Apr 4 6:38 AM
            Satyen,

            Thankyou very much. I added the reference to the form. It all works
            fine now in BOTH IE and FF. I appreciate your detailed response and
            the chance to learn something about JavaScript.

            THANKYOU!
            John
            --- In ydn-javascript@yahoogroups.com, "Satyen Desai" <sdezzi@...>
            wrote:
            >
            > Hi John,
            >
            > The problem is not really Calendar related, but the way you are
            > accessing the "dates" object.
            >
            > Based on a cursory glance of your code, it seems like you'd like
            to
            > get hold of the FORM you have on your page which has name="dates",
            > id="dates", and you're using "this.dates" to refer to it.
            >
            > "this.dates" will not work in FF, since "this" refers to the
            window.
            >
            > In fact it isn't really the proper way to access the form in IE
            > either, but only works because IE creates a reference to DOM
            > elements with IDs (in general) as window level variables
            >
            > You should use the document object to retrieve the form and it's
            > elements ( document.forms["dates"] OR document.forms[0] OR
            > document.dates ) or retrieve the elements using YAHOO.util.Dom.get
            > ("dates")
            >
            > Hope that helps,
            > Satyen
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.