> placeEdit is the DIV where the edit table is rendered. This table
> includes textareas where you can modify values. In IE, the changes are
> picked up, but in other browsers, I only get the original values, no
> changes. I did some reading and apparently innerHTML is proprietary M$
> stuff and only works so-so elsewhere.
>
> Any suggestions/alternatives as to how I can retrieve the content of
> the DIV? And I need the HTML code, so I can do the appropriate
> replacements and get the parameters that I need, so textContent (which
> also ignores changes) is out.
Take a look at the code in TiddlyTools' SnapshotPlugin getSnap()
function. In particular, the following lines:
-----------------------
var elems=snapElem.getElementsByTagName('input');
for (var i=0; i<elems.length; i++) { var e=elems[i];
if (e.type=='text') e.defaultValue=e.value;
if (e.type=='checkbox') e.defaultChecked=e.checked;
if (e.type=='radiobutton') e.defaultChecked=e.checked;
}
var elems=snapElem.getElementsByTagName('textarea');
for (var i=0; i<elems.length; i++)
elems[i].defaultValue=elems[i].value;
-----------------------
The above code sets the "defaultValue" of any form fields to match
that fields current value. Then, when snapElem.innerHTML is retrieved
as text, those fields will have: defaultValue="..." included in the
HTML syntax.
enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...
http://www.TiddlyTools.com/#Donations
Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
http://www.TiddlyTools.com/#Contact
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.