Not signed in (Sign In)

Powered by Vanilla 1.1.8.

Welcome Guest!
Want to take part in these discussions? If you have an account, please sign in. If you don't have an account, register now.
    • CommentAuthorterfle
    • CommentTimeJun 17th 2009
     #1

    I get the following error: '0.className' is null or not an object
    on this line: if(parent[0] && (parent[0].className.indexOf(settings.holder_class) >= 0)) {
    when clicking a submit button. Any ideas?

    Here is the code below:

    return this.each(function() {
    var form = jQuery(this);

    // Focus specific control holder
    var focusControlHolder = function(element) {
    var parent = element.parent();

    while(typeof(parent) == 'object') {
    if(parent) {
    if(parent[0] && (parent[0].className.indexOf(settings.holder_class) >= 0)) {
    parent.addClass(settings.focused_class);
    return;
    } // if
    } // if
    parent = jQuery(parent.parent());
    } // while
    };

    • CommentAuthorterfle
    • CommentTimeJun 17th 2009
     #2

    It seems to be an issue with parent reaching the document object. I put in the following line of code and it seems like a good band-aid fix.

    if(parent) {
    if (parent[0] === document) return;
    if(parent[0] && (parent[0].className.indexOf(settings.holder_class) >= 0)) {