hi,
I am using template and display number of fields on a form for user editing. However, based on changes made to one field I need to be able to update content of another field. However, they are not in one template record, but in different template records.
Code snippet is below.
In my sp_DBR_RMACustomerEmailPreview_edit_partnumber and sp_DBR_RMACustomerEmailPreview_edit_qty procedures I update value of EmailBody column in RMAEmailStaging table.
I need somehow to force refresh value displayed in second record "body" inside of textarea.
How would I go about it?
SELECT 'dbr.record', 'begin', 'invoiceparts';
SELECT 'dbr.search', 0;
SELECT 'dbr.hideheader';
SELECT 'dbr.hidecolumn','ID';
SELECT 'dbr.editable', '[PartNumber]', 'sp_DBR_RMACustomerEmailPreview_edit_partnumber', 'inID=ID','inPartNumber=PartNumber';
SELECT 'dbr.editable', '[Qty]', 'sp_DBR_RMACustomerEmailPreview_edit_qty', 'inID=ID','inQty=Qty';
SELECT 'dbr.javascript', "function confirmdel(obj) {return confirm('Delete \\''+$(obj).parent().children().eq(1).text()+'\\'?');}";
SELECT 'dbr.report', 'sp_DBR_RMACustomerEmailPreview_del', '[del]', 'hiddendiv', 'inID=ID', 'inRefNumber=(inRefNumber)', 'event=click', 'callbefore=confirmdel';
SELECT 'dbr.purehtml:<div class="i_delete"></div>' as '[del]', ID, PartNumber, Qty FROM RMAEmailStaging WHERE SalesRep = inLogin;
SELECT 'dbr.embed_object', 'hiddendiv';
SELECT 'dbr.record', 'end';
SELECT 'dbr.record', 'begin', 'body'; SELECT 'dbr.search', 0; SELECT 'dbr.hideheader'; SELECT 'dbr.colstyle', 'EmailBody', '[width:300px;height:144px;border:1px solid black]'; SELECT 'dbr.editable', '[EmailBody]', 'sp_DBR_RMACustomerEmailPreview_edit_body', 'inLogin=[inLogin]','inEmailBody=EmailBody', 'type=textarea', "options={'rows':20,'cols':50}"; SELECT EmailBody FROM RMAEmailStaging WHERE SalesRep = inLogin LIMIT 1; SELECT 'dbr.record', 'end';
SELECT 'dbr.template', '#RMACustomerEmailPreview';
SELECT "dummy";
.....
Thank you!