How to correct the error "crossobj has no properties" in mozilla

Discussion in 'Javascript' started by rajesh, Jan 12, 2006.

  1. rajesh

    rajesh Guest

    rajesh, Jan 12, 2006
    #1
    1. Advertising

  2. rajesh

    VK Guest

    rajesh wrote:
    > URL:
    > ***
    > http://www.webdeveloping.nl/forum/showthread.php?s=0cfd9dadcad70f5454595
    > 879ad73140b&threadid=2037&goto=nextoldest


    Please do not start new topic with each reply.
    Reply to the original thread which you have started.

    It is a very obscure (let's stick to this word) script, so the global
    answer would be: it may work in Internet Explorer because IE is trying
    to understand some code where any other browser would give up on the
    first line. For the same reason it may fall in Firefox or any other
    browser.

    As a durty fix try to replace this ugliness:
    ....
    crossobj=(dom)?document.getElementsByName("calendar").style:
    ie?document.all.calendar:document.calendar
    ....

    to
    ....
    crossobj = (document.getElementById) ?
    document.getElementById("calendar") : null;
    ....

    and make sure that you nave on your page a <div> (or whatever a hey is
    that) with id="calendar"

    For a more conventional (though not perfect of course) popup calendar
    sample you may look at:
    <http://www.dynamicdrive.com/dynamicindex7/jasoncalendar.htm>
    VK, Jan 12, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. joon
    Replies:
    1
    Views:
    511
    Roedy Green
    Jul 8, 2003
  2. Dan

    correct or not correct?

    Dan, Oct 2, 2003, in forum: HTML
    Replies:
    7
    Views:
    431
  3. Henri
    Replies:
    9
    Views:
    1,812
    Toby Inkster
    Feb 22, 2005
  4. rajesh
    Replies:
    1
    Views:
    80
  5. rajesh
    Replies:
    1
    Views:
    117
    Dr John Stockton
    Jan 13, 2006
Loading...

Share This Page