In the admin area I can edit the news (title, abstract, main text), this is all in 3 languages. I want to make it so that if some field has not changed, then we have not saved it (since there will be 9 fields, 3 for each language).
I create a prototype for the news:
var proto_content = { title:"", annon:"", text:"", len:new Array(6) };
then objects:
var content_rus = Object.Create(proto_content); var content_eng = Object.Create(proto_content); var content_fra = Object.Create(proto_content);
when filling:
content_rus.len[0] = 1; content_eng.len[0] = 2; content_fra.len[0] = 3;
at output:
content_rus.len[0] -> 3 content_eng.len[0] -> 3 content_fra.len[0] -> 3
Why property one on all objects? Tried new Object (proto_content) .... same story.