留言板
function does not return
lfr 6.1 ga2
The result of the console:
aaaa
===undefined
please help
<aui:script use="aui-io, aui-base, aui-io-request, aui-form-validator, aui-overlay-context-panel">
Liferay.provide(window, 'boolCheckBox',
function() {
var next = "aaaa";
console.log(next);
return next;
},
['aui-node']
);
Liferay.provide(window, '<portlet:namespace />submit',
function() {
console.log("==="+boolCheckBox());
document.<portlet:namespace />fm.<portlet:namespace /><%= Constants.CMD %>.value = boolCheckBox();
submitForm(document.<portlet:namespace />fm);
},
['liferay-util-list-fields']
);
......
......
</aui:script>
The result of the console:
aaaa
===undefined
please help