74
rated 0 times
[
76]
[
2]
/ answers: 1 / hits: 22677
/ 12 Years ago, wed, july 4, 2012, 12:00:00
I am having issues passing a dynamic parameter to a JavaScript function using innerHTML.
Included below is the current code that I am 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 name
variable is null
.
I believe there is a problem with the declaration of the value while modifying the innerHTML property.
Any help would be greatly appreciated.
Thanks
More From » html