UPDATE - solution provided in the latest comment below.
I've encountered a peculiar issue while attempting to transfer and retrieve JSON data through a hidden variable. Despite intense scrutiny and exhaustive searches, I remain stumped as to why this problem persists. It's frustratingly elusive, but I'm convinced it's just a minor oversight on my part:
- Line 504 & 508 display the correct data (with the exception of the description field which was altered), yet line 509 reveals an extra object under _attachments that is absent in the prior two lines. Why is that?
- On line 509, there's a discrepancy between the header line description text and the body description text - the latter being accurate.
The discrepancies observed in Chromium are mirrored in Firefox. Referencing the code snippet and console logs below:
503 var pp = $("#new-event-page").find("input[name=event_data]").val();
504 console.log(pp);
505 // comment
506 var paramx = JSON.parse(pp);
507 //comment
508 console.log(JSON.stringify(paramx));
509 console.log(paramx);
Here's how the console log output appears after some manual formatting:
testa.js:504--{"name":"Untitled-1369464011",
"description":"Previously added image - only this text is updated",
"occurred":"2013-05-25",
"group":"empty",
"category":"empty",
"_attachments":{"globe.png":{"content_type":"image/png",
"digest":"md5d8ba0496f16bdf74d6310432abf2a530"}},
"_id":"0C1CA0F4-2DF4-46F2-9D35-415674D6452A",
"_rev":"5-1d108457b606cc4388160ca46ffefbbf"}
testa.js:508--{"name":"Untitled-1369464011",
"description":"Previously added image - only this text is updated",
"occurred":"2013-05-25",
"group":"empty",
"category":"empty",
"_attachments":{"globe.png":{"content_type":"image/png",
"digest":"md5-d8ba0496f16bdf74d6310432abf2a530"}},
"_id":"0C1CA0F4-2DF4-46F2-9D35-415674D6452A",
"_rev":"5-1d108457b606cc4388160ca46ffefbbf"}
testa.js:509--Object {name: "Untitled-1369464011", description: "Previously added image - only this text is updated", occurred: "2013-05-25", group: "empty", category: "empty"…}
_attachments: Object
globe.png: Object
content_type: "image/png"
__proto__: Object
opAAAAAElFTkSuQmCC: Object
content_type: undefined
__proto__: Object
__proto__: Object
_id: "0C1CA0F4-2DF4-46F2-9D35-415674D6452A"
_rev: "6-001ee0c89c5b9dbe2b06e5b926ad446d"
category: "empty"
description: "Previously added image - only this text is updated - revised"
group: "empty"
name: "Untitled-1369464011"
occurred: "2013-05-25"
__proto__: Object