www.webdeveloper.com
Results 1 to 8 of 8

Thread: element.getElements is not a function... ??? im totaly lost now..

  1. #1
    Join Date
    Mar 2010
    Posts
    13

    Question element.getElements is not a function... ??? im totaly lost now..

    well problem is :

    PHP Code:
    element.getElements is not a function
    [Break 
    on this error][Line 119element.getElements(options.elementSelector).each(function(el) { 

    part of source code :

    PHP Code:
        populateGallery: function(elementstartNumber) {
            var 
    data = [];
            
    options this.options;
            
    currentArrayPlace startNumber;
            
    element.getElements(options.elementSelector).each(function(el) {
                
    elementDict = {
                    
    imageel.getElement(options.imageSelector).getProperty('src'),
                    
    numbercurrentArrayPlace,
                    
    transitionthis.options.defaultTransition
                
    };
                
    elementDict.extend $extend;
                if ((
    options.showInfopane) | (options.showCarousel))
                    
    elementDict.extend({
                        
    titleel.getElement(options.titleSelector).innerHTML,
                        
    descriptionel.getElement(options.subtitleSelector).innerHTML
                    
    });
                if (
    options.embedLinks)
                    
    elementDict.extend({
                        
    linkel.getElement(options.linkSelector).href||false,
                        
    linkTitleel.getElement(options.linkSelector).title||false,
                        
    linkTargetel.getElement(options.linkSelector).getProperty('target')||false
                    
    });
                if ((!
    options.useThumbGenerator) && (options.showCarousel))
                    
    elementDict.extend({
                        
    thumbnailel.getElement(options.thumbnailSelector).getProperty('src')
                    });
                else if (
    options.useThumbGenerator)
                    
    elementDict.extend({
                        
    thumbnailoptions.thumbGenerator '?imgfile=' elementDict.image '&max_width=' options.thumbWidth '&max_height=' options.thumbHeight
                    
    }); 

    whole code : #ansvop42-2918 - PHP - Sourcecode



    and genereted code :
    PHP Code:
     populateGallery: function(elementstartNumber) {
     var 
    data = [];
     
    options this.options;
     
    currentArrayPlace startNumber;
     
    element.getElements(options.elementSelector).each(function(el) {
     
    elementDict = {
     
    imageel.getElement(options.imageSelector).getProperty('src'),
     
    numbercurrentArrayPlace,
     
    transitionthis.options.defaultTransition
     
    };
     
    elementDict.extend $extend;
     if ((
    options.showInfopane) | (options.showCarousel))
     
    elementDict.extend({
     
    titleel.getElement(options.titleSelector).innerHTML,
     
    descriptionel.getElement(options.subtitleSelector).innerHTML
     
    });
     if (
    options.embedLinks)
     
    elementDict.extend({
     
    linkel.getElement(options.linkSelector).href||false,
     
    linkTitleel.getElement(options.linkSelector).title||false,
     
    linkTargetel.getElement(options.linkSelector).getProperty('target')||false
     
    });
     if ((!
    options.useThumbGenerator) && (options.showCarousel))
     
    elementDict.extend({
     
    thumbnailel.getElement(options.thumbnailSelector).getProperty('src')
     });
     else if (
    options.useThumbGenerator)
     
    elementDict.extend({
     
    thumbnailoptions.thumbGenerator '?imgfile=' elementDict.image '&max_width=' options.thumbWidth '&max_height=' options.thumbHeight
     
    }); 
    Last edited by Kor; 03-23-2010 at 07:19 AM. Reason: insert Moo Tools prefix

  2. #2
    Join Date
    Feb 2010
    Posts
    73
    shouldnt it be $(element).getElements(...)

  3. #3
    Join Date
    Mar 2010
    Posts
    13
    not working with it kubas

    with $

    $(element).getElements is not a function
    [Break on this error] $(element).getElements(options.elementSelector).each(function(el) {

  4. #4
    Join Date
    Mar 2010
    Posts
    13
    well i try with mootools $ES function like

    Code:
    $ES(options.elementSelector, element).each(function(el) {
    but now im getting

    $ is not a function
    [Break on this error] return ($(filter) || document).getElementsBySelector(selector)

    at mootools.v1.11.js (satır 1182)


    code :

    function $E(selector, filter) {
    return ($(filter) || document).getElement(selector)
    };
    function $ES(selector, filter) {
    return ($(filter) || document).getElementsBySelector(selector)
    };

    any idea ?

  5. #5
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    Quote Originally Posted by niennasill View Post
    well i try with mootools
    Shall we understand that you are using mootools? If so, why haven't you said that from the very beginning? We are not suppose to recognize the frameworks custom methods.

  6. #6
    Join Date
    Mar 2010
    Posts
    13
    yea im using mootools 'n its my bad.

  7. #7
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    OK. I have specified for you the index of the thread to MooTools. Now people here could easily help you as they know what is all about from the title of your thread

    Just a note: better use [ code ], not [ php ]. In php way the backslashes are deleted, for a reason or another:
    Code:
    var regExp=/^[\d]*$/;
    PHP Code:
    var regExp=/^[\d]*$/; 

  8. #8
    Join Date
    Mar 2010
    Posts
    13
    thx kor

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles