Tanmay Barman ha scritto:
Hi all,
I have added a dropdown field in my dialog and want to invoke a custom
java script on change of dropdown option field. Can any one let me
know please how to incorporate a custom js in a dialog regarding this
purpose.
If that can be done then where do I need to keep this js?
Quickly, extends a standard Magnolia dropdown dialog, e.g.:
info.magnolia.cms.gui.dialog.DialogMultiSelect
look here:
public String getInnerHtml() {
String name = "/" +
StringUtils.replace(DialogMultiSelect.class.getName(), ".", "/") +
"Inner.html";
Map map = new HashMap();
map.put("this", this);
return FreemarkerUtil.process(name, map);
}
It will include a freemarker tpl located here:
<magnolia-gui>/src/main/resources/info/magnolia/cms/gui/dialog/DialogMultiSelect.html
and replace freemarker placeholder with map values.
-------------------------------------------------------
So, my advise is to extends a dialog (the more similar you find to the
behaviour you want) and then include a freemarker tpl: in that file, you
can put whatever you want, include javascript...
M.
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------