Jump to content

Reference to uknown object property


Xtremer360

Recommended Posts

I'm trying to figure out what i'm doing wrong here. It should be showing a list of values for each match with an object property of titles_id_list and its giving me an error of "reference to undefined property "titles_id_list". This error only occurs when I submit my form.

 

// Add the matches
            for( var match_number = 0; match_number < <?php echo $number_of_matches ?>; match_number++ ) {
            	var li_titles = $('ul#titles_defended'+ match_number +' li');
                var titles_id_list = "";
                var j = 0;
                $('ul#titles_defended'+ match_number +' li').each(function(){
                    var li_title = $( li_titles[ j ] );
                    
                    // only start appending commas in after the first characterID
                    if( j > 0 ) {
                        titles_id_ist += ","; 
                    }
                    
                    // append the current li element's characterID to the list
                    titles_id_list += li_title.attr( 'title_id' );
                    j++;
                });
                var itemObj = new Object();
            	itemObj.type = "Match";
            	itemObj.description = "Match #" + (i+1);
                itemObj.match_type_id = $('select#match_type_drop'+ (i+1)).val();  
                itemObj.titles_id_list = titles_id_list;
            	eventItems.push( itemObj );
            }

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.