I have the following string:
myfunction = "'insertbb('" + myvalue + "')'"
sNewRecipe = "<table>tr><td class='stySubItem1'>input type='button' onClick=" + myfunction + " value='Browse'/> </td></tr></table>"
folderTree.innerHTML = sNewRecipe
With the above I get a syntax error
If I remove the single quote from myfuntion as such:
myfunction = "insertbb('" + myvalue + "')"
sNewRecipe = "<table>tr><td class='stySubItem1'>input type='button' onClick=" + myfunction + " value='Browse'/> </td></tr></table>"
folderTree.innerHTML = sNewRecipe
With the above I get I get an Expect ")" error.
I am using javascript.
I do not understand why I am getting the syntax errors. Any help would be appreciated. I could be over looking something, but since I can't seem to figure it out, I thought I would ask for help. Thanks in advance.
myfunction = "'insertbb('" + myvalue + "')'"
sNewRecipe = "<table>tr><td class='stySubItem1'>input type='button' onClick=" + myfunction + " value='Browse'/> </td></tr></table>"
folderTree.innerHTML = sNewRecipe
With the above I get a syntax error
If I remove the single quote from myfuntion as such:
myfunction = "insertbb('" + myvalue + "')"
sNewRecipe = "<table>tr><td class='stySubItem1'>input type='button' onClick=" + myfunction + " value='Browse'/> </td></tr></table>"
folderTree.innerHTML = sNewRecipe
With the above I get I get an Expect ")" error.
I am using javascript.
I do not understand why I am getting the syntax errors. Any help would be appreciated. I could be over looking something, but since I can't seem to figure it out, I thought I would ask for help. Thanks in advance.