onSuccess: { fn: function list_news_onConfig_success(response) { var div = Dom.get(this.id + "-form"); div.innerHTML = response.serverResponse.responseText; var form = Dom.getFirstChildBy(div, function(node) { return (node.tagName.toUpperCase() == "FORM"); }); if (form) { if (form.attributes["prop_ca_title"]) { var testLogin = form.attributes["title"].value; }
if (form.attributes["description"]) { var testPass = form.attributes["description"].value; }
if (form.attributes["category"]) { var testPass = form.attributes["category"].value; }
} /*var obj = response.json; if(obj) { this.options = YAHOO.lang.merge(this.options, obj); } var result = eval('(' + obj + ')');*/
Thanks for your answer ! I have create a dashlet with a configure link, when it's clicked I can add a product by editing his title, description & category then I submit it to the document library of my specific site. Into my dashlet I can save the information aboout my product. Here is my ftl file :
<javascript> <#assign el=args.htmlid?js_string>
<script type="text/javascript">//<![CDATA[
(function() { var list_news = new custom.dashlet.list_news("${args.htmlid}").setOptions( { "componentId": "${instance.object.id}", "title": "${title}", "description": "${description}", "category": "${category}", }).setMessages(${messages});