I have an html table with each row having a button that has its onclick defined as follows:
onclick=edit(parm1,parm2,event) // this is generated from php
Then, I have the edit function defined as something like this:
function edit (parm1, parm2, event)
Well, then in "edit" I need to redefine the onclick definition for the button that called "edit" because parm1 and parm2 have changed. So, I find the button in question and say something like:
str = parm1 + "," + parm2 + "," + "event";
button.onclick = new Function("", str);
After these actions, I click on the button and this time "event" is not defined in "edit". How do I redefine the function so that "event" is passed correctly on subsequent calls to "edit"?
I tried this too:
str = parm1 + "," + parm2 + "," + "event";
button.onclick = new Function("event", str);
onclick=edit(parm1,parm2,event) // this is generated from php
Then, I have the edit function defined as something like this:
function edit (parm1, parm2, event)
Well, then in "edit" I need to redefine the onclick definition for the button that called "edit" because parm1 and parm2 have changed. So, I find the button in question and say something like:
str = parm1 + "," + parm2 + "," + "event";
button.onclick = new Function("", str);
After these actions, I click on the button and this time "event" is not defined in "edit". How do I redefine the function so that "event" is passed correctly on subsequent calls to "edit"?
I tried this too:
str = parm1 + "," + parm2 + "," + "event";
button.onclick = new Function("event", str);