It looks like the error is not grumpy with this code, but with when you're running it. Have you tried performing this at an allowed point in the page life cycle?
I like to work programatically myself, and I can confirm that it's a bit grumpy around the edges.
__________________
-------------------------
Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe
When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper
Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.
|