Hi!
You may write similar function as set_return in "include/javascript/sugar_grp1.js"
where you should use ajax function to get any data you need.
like this:
Code:
function r_set_return(popup_reply_data){
from_popup_return=true;
var form_name=popup_reply_data.form_name;
var name_to_value_array=popup_reply_data.name_to_value_array;
for(var the_key in name_to_value_array){
if(the_key=='toJSON'){}else{
var displayValue=name_to_value_array[the_key].replace(/&/gi,'&').replace(/</gi,'<').replace(/>/gi,'>').replace(/'/gi,'\'').replace(/"/gi,'"');;
window.document.forms[form_name].elements[the_key].value = displayValue;
}
}
doWork(); <- there we should use ajax
} and set custom code for popup in editviewdefs:
Code:
onclick=\'open_popup("teams_teams", 600, 400, "", true, false, {literal}{{/literal}"call_back_function":"r_set_return","form_name":"EditView","field_to_name_array":{literal}{{/literal}"id":"team_id","name":"team_name"{literal}}{/literal}{literal}}{/literal}, "single", true);\'
Bookmarks