any luck so far?
i stilll don’t have your answer… but some ideas for figuring it out.
1. try changing the value and testing it.
did you try changing the value of the edCanvas to see if it works?
edCanvas = document.getElementById('title');
2. try making a function and testing it.
since it is using getElementBy and sending in a value, there must be someway to have some kind of onclick action to send the value as a variable: through a function in javascript. something like:
function edCanvasvalue (id) {
edCanvas = document.getElementById(id);
}
then call the javascript function… try testing it with buttons first
<input type="button" value="Set to title field" onclick="edCanvasvalue('title')">
<input type="button" value="Set to content field" onclick="edCanvasvalue('content')">
then try filling in the form, and see if it set the right fields.
3. try setting the the ID with a getFocus() from form field. this is where i’m a bit unsure…
i’m just making this up, bc i don’t know much javascript.
and hopefully there might be javascript-specific fora to find the answer from others:
try: https://www.codingforums.com/
that’s alll not very helpful probably, but i wanted to post it in case you had not thought of trying those things?