rrt - Saturday, February 20, 2016 5:50 AM:
hiii
i write following js method and want result of this methos into html page in table format
my js method
var myinnovator = this.getInnovator();
var itemname=this.getProperty("symbi_item");
var manfact=this.getProperty("symbi_manufacturer");
var supl=this.getProperty("symbi_supplier");
var grnno=this.getProperty("symbi_grn_number");
var qty=this.getProperty("symbi_qc_total");
var grnid=this.getProperty("id");
var challan=this.getProperty("symbi_challan");
var iFmBom=myinnovator.newItem("Symbi_GRN_Item","get");
iFmBom.setProperty("source_id",grnid);
var result = iFmBom.apply();
var btno=result.getProperty("symbi_batch_no");
var noconts=result.getProperty("symbi_no_of_conts");
var content = "<table>";
content += "" +
"<tr>" +
"<td>" + this.getProperty("symbi_grn_number") + "</td>" +
"<td>" + result.getProperty("symbi_batch_no") + "</td>" +
"<td>" + result.getProperty("symbi_no_of_conts") + "</td>" +
"</tr>";
content += "</table>";
return content;
thanks in advance
tstickel - Saturday, February 20, 2016 4:34 PM:
I have 2 suggestions:
1. What is returned from the statement, var result = iFmBom.apply();, could be a single item, a collection of items or even an error indicating that there were no items that matched your search criteria. Your code needs to be enhanced to consider these 3 possibilities. As it now stands, your code assumes that only one item will be found.
2. There are many samples that can be found using Google for dynamically adding a table to an html page using Javascript. One such example is found at www.mysamplecode.com/.../generate-html-table-using-javascript.html
rrt - Sunday, February 21, 2016 10:30 AM:
thanks for your reply tstickel,
Actully value of property of itemtype i get, i want to show this value in html table format . i get all the values of property but i not able to show this property in html page with table format
thanks
r
rrt - Wednesday, February 24, 2016 11:27 AM:
I got solution,we have to write following code at the place of return(content);
document.write(content);