I'm having trouble passing a dynamic parameter to a JavaScript function using innerHTML.
Below is the current code I'm using:
var name = "test"; frm.innerHtml = '<button name="close" id="close" title="Cancel" type="button" onclick="closeTab('+name+');">Return</button>';
When I debug the code of the closeTab() function, the parameter specified by the variable name is null .
I believe that there is a problem with declaring a value when changing the innerHTML property.
Any help would be greatly appreciated.
thanks
source share