Menu
I have a button. And in a function, I am changing the onClick attribute.
I have to parameters that I wish to pass into the function from the current function: ‘node’ and ‘datetext’.
var button = document.getElementById(“append”);
button.setAttribute(“onClick”, “SendEditBlog(‘”+ node + “, “+ datetext +”‘)”);
This is how the next function parses the parameters in.
function SendEditBlog(node, datetext)
{
}
When the values parse into the new function, the node variable contains that values of ‘node’ and ‘datetext’, and datetext is undefined.
What have I done??