Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Banned
    Join Date
    Mar 2007
    Posts
    1,523
    Thanks
    116
    Thanked 0 Times in 0 Posts

    Question is not a function

    Please help,

    I am using this MooTools datepicker: http://www.styledisplay.com/mootoolsdatepicker/ but with the latest MooTools version: MooTools 1.4.5

    I click on my textbox and select a date but the calendar stays on the screen and I cannot see my submit button.

    my FireFox console gave the following error:

    TypeError: dp.container.remove is not a function

    else if (dp.container) dp.container.remove();


    here is the relevant Javascript code:
    Code:
    /* Remove the calendar from the page */
    	remove: function(dp){
    		$clear(dp.interval);
    		dp.active = false;
    		if (window.opera) dp.container.empty();
    		else if (dp.container) dp.container.remove();
    		dp.calendar = false;
    		dp.container = false;
    		$$('select.dp_hide').removeClass('dp_hide');
    	}

  • #2
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Posts
    2,980
    Thanks
    56
    Thanked 557 Times in 554 Posts
    I know nothing about MooTools, but should this have two $$
    Code:
    $$('select.dp_hide').removeClass('dp_hide');
    ?

  • #3
    Banned
    Join Date
    Mar 2007
    Posts
    1,523
    Thanks
    116
    Thanked 0 Times in 0 Posts
    thanks but that didn't work

  • #4
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,904
    Thanks
    79
    Thanked 4,423 Times in 4,388 Posts
    I don't use mootools, either. But reading their documentation, I indeed see the method empty( ) noted:
    http://mootools.net/docs/core/Elemen...#Element:empty

    But I do *NOT* see any method named remove( ).

    Perhaps you meant destroy( )?
    http://mootools.net/docs/core/Elemen...lement:destroy

    In any case, perhaps reading that documentation would help?
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Tags for this Thread

    Posting Permissions

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