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
https://forums.phpfreaks.com/topic/237727-reference-to-uknown-object-property/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.