Hey Team,
This will be a pretty easy one to figure out I believe but I can't see what I'm doing wrong here. I am trying to add a button to a dropdown menu and have that button modify the subject line. I can get it working from the initial button click but not from the innerHTML I keep getting an error message saying: Uncaught ReferenceError: jim is not defined
The entire code is here:
InboxSDK.load('1', 'Hello World!').then(function(sdk){
// the SDK has been loaded, now do something with it!
sdk.Compose.registerComposeViewHandler(function(composeView){
function jim() {
composeView.setSubject('[Random text]' + ' ' + composeView.getSubject() );
}
composeView.addButton({
title: "Options",
type: "MODIFIER",
iconClass: "Small",
iconUrl: chrome.runtime.getURL('spanner.png'),
hasDropdown: true,
onClick: function(menu) {
menu.dropdown.el.innerHTML = "<input type=button onclick=jim() value=button1> <p><input type=button value=button2>";
},
Yes I know its basic but i'm a newbie..