SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast O_o.moo's Avatar
    Join Date
    Aug 2007
    Location
    South Africa
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript error - could not find the element

    Error: [Exception... "'Control.Tabs could not find the element: main_tabs' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: http://mysite.com/folder/javascriptfile.js44] :: anonymous :: line 265" data: no]
    Source File: http://mysite.com/folder/javascriptfile.js
    Line: 265

    Code JavaScript:
    >264			if (document.createEvent) {
    >265				element.dispatchEvent(event);
    >266			} else {
    >267				element.fireEvent(event.eventType, event);
    >268			}
     
    			return Event.extend(event);
    		}
    	};
    })());
    My Temporary Résumé!
    watch this space

  2. #2
    SitePoint Enthusiast O_o.moo's Avatar
    Join Date
    Aug 2007
    Location
    South Africa
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh, and...

    Code JavaScript:
    <script>
    	document.observe('dom:loaded',function(){
    		new Control.Tabs('main_tabs',{
    			linkSelector: 'li.tab a'
    		});})
    </script>

    ... inside the body
    My Temporary Résumé!
    watch this space

  3. #3
    SitePoint Enthusiast O_o.moo's Avatar
    Join Date
    Aug 2007
    Location
    South Africa
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No worries...

    I found it

    Pretty simple really...

    I had to define my <ul>'s with "main_tabs" which was "tabs_example_one".
    My Temporary Résumé!
    watch this space


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
  •