View Single Post
Old 10-05-2012, 09:04 PM   PM User | #5
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,188
Thanks: 59
Thanked 3,995 Times in 3,964 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
This isn't even legal code:
Code:
removeSplChars('Kitchen Tools', 'Textiles', 'Chef's Apron', '');
I have marked in red the strings in that code. A string begins with a " or ' and ends with the next matching " or '.

If you want to embed a " or ' inside a string that is delimited by the same character, you must "escape" the character:
Code:
removeSplChars('Kitchen Tools', 'Textiles', 'Chef\'s Apron', '');
or you can use the other string delimiter:
Code:
removeSplChars('Kitchen Tools', 'Textiles', "Chef's Apron", '');
Anyway, I *suspect* that you simply have hour call to the function in the wrong place. Remove it from where you have it and try it here:
Code:
   _gaq.push(['_setCustomVar',
              2, // This custom var is set to slot #2.
              'Kitchen Tools', // The top-level name for your online content categories.
              removeSplChars('Kitchen Tools|Textiles|Chef\'s Apron|'), // Records value of breadcrumb name
              3 // Sets the scope to page-level.
             ]);
But that's purely a guess.

At the least, it should produce no errors.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is online now   Reply With Quote