I am facing problems with setAttribute function in IE. I understand from what I read on the net that IE doesn't support it and will never support it. I would like to understand if there is a solution for what I want to do that works both in IE (at least version 7 onwards) and Firefox.
My requirement is:
Below is a sample code where I am using an alternate solution by hiding and showing hyperlinks. While I can afford to do it for this example, I cannot in many places in the rest of my code.
So, if I can get help on satisfying my requirement in the below code without the alternate solution I am currently using, it will help me fix the rest of my code.
is calling the function defined here:
document.getElementById('edit').setAttribute("onclick", "saveCompany('save company');");
I want to change companyEdit() to saveCompany() dynamically using setAttribute.
Above example is not working IE only.
For this i have one alternative solution
i have another hyperlink like
when somebody cick on edit link i am changing display:none to display:block.