Hi All
I encounter another problem. onclick function is not working
var html ='<html lang="en">'
+'<body>'
+ '<div>'
+ '<ul>'
+ '<li><a id ="DashBoard" onclick="runMenuHandler(id)" href="javascript:;" ><span>DashBoard</span></a></li>'
+ '</ul>'
+ '</div>'
+ '<script src="media:///js/jquery.js"></script>'
+ '<script>'
+ '$(document).ready(function() {'
+ 'function runMenuHandler(layoutId){'
+ plugins.WebClientUtils.generateCallbackScript(runMenuHandlerServoy, ['layoutId'])
+ '}'
+ '});'
+ '</script>'
+'</body></html>';
i am doing this onShow function. I did write runMenuHandlerServoy. The thing is that its given good UI. but on click its not hitting function runMenuHandler. console.log inside runMenuHandler is not printing any thing.
onclick="javascript:runMenuHandler(id)" is giving error -
Could not eval the string 'runMenuHandler(id)'
ReferenceError: "runMenuHandler" is not defined. (internal_anon#1)
at internal_anon:1
Though following code is working fine
+'$("#DashBoard").click(function(event){'
+ plugins.WebClientUtils.generateCallbackScript(runMenuHandlerServoy,['event'])
+'});'
Note: i have used some external js like dcjqaccordion.2.7.js, cookie.js etc. though the code is bit complicated, loading the values from database but i have given simple sample. I cant use .click way because with many item in list its difficult to manage. So, onclick would be a better option
Please help. I did many hit and trial but none is giving me proper result.
Thanks
Nand