Hello,

Is it possible to convert elements / text nodes to JSON using
Object.toJSON()? I need them in JSON so I can store them in a cookie for the
cookiejar class I am creating.

sample code:

var element = new Element('div');
var nativeelement = document.createElement('div');
var textnode = document.createTextNode('this is text');

alert('element: ' + Object.toJSON(element)); // <-- undefined
alert('nativeelement: ' + Object.toJSON(nativeelement)); // <-- undefined
alert('textnode: ' + Object.toJSON(textnode)); // <-- firefox hangs, "too
much recursion" on line 546

-Hector

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to