SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Aug 2007
    Posts
    154
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IE Mootools domready problem

    I'm having a problem with IE and a Mootools Calendar i'm implementing. Whenever I load the page in IE, i occasionally get the error "Internet Explorer cannot open the internet site http:....... Operation aborted". I've read a few posts and articles about this problem and it seems that issue can occur when trying to load events before the dom is ready. However, I'm using the mootools window Event 'domready' and i'm still getting the error message!

    The page is at http://www.maguiresonline.co.uk/deve...%20of%20Class/

    I'm adding events in two places, in contact.js as follows. This code is not causing the problem:
    Code:
    window.addEvent('domready', addOnClick);
    window.addEvent('domready', ajaxContact);
    The code which is causing the problem is when i instantiate my calendar, using the following in my index.php homepage:
    Code:
     <script type = "text/javascript">
    	window.addEvent('domready', function() { myCal = new Calendar({ departure_date: 'd/m/Y' }); });
    	window.addEvent('domready', function() { myCal = new Calendar({ return_date: 'd/m/Y' }); });
       </script>
    Thanks in advance for any help with this one!

  2. #2
    SitePoint Guru Ruben K.'s Avatar
    Join Date
    Jun 2005
    Location
    Alkmaar, The Netherlands
    Posts
    693
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Window.addEvent does not exist/work in IE as far as I know

  3. #3
    SitePoint Zealot
    Join Date
    Aug 2007
    Posts
    154
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Ruben, i'm not 100% sure but window.addEvent seems to work fine in IE when using Mootools for other applications other than this calendar - and there only seems to be some instances of people having the same problem i'm having.

    There is no problem using window.addEvent for these functions:
    Code:
    window.addEvent('domready', addOnClick);
    window.addEvent('domready', ajaxContact);
    i've tried changing domready to load and so far this seems to be working (fingers crossed)....
    Code:
    	window.addEvent('load', function() { myCal = new Calendar({ departure_date: 'd/m/Y' }); });
    	window.addEvent('load', function() { myCal = new Calendar({ return_date: 'd/m/Y' }); });


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •