Dear All,
Please assist me for below code :
What i need is -> One "Patient Master" form for online Entry :
My AIM -> When somebody want to add new patient a parent form will open
than finally he typed patient id " jakap " and press tab button than a
new pop window will
open and finally displays all name / id starts with " ja " when user
will click on any of patient using checkbox corresponding to his name
and id then all pop up form values like his name, last name , id and
dob will be autocomplete in parent form this already i've achieved but
i am facing problem when single record will be there in popup window at
that moment parent form is not filled by popup values because length is
coming undefined :
My function is accepting field parameter which checkbox name (pt_id)
and popup window
will generate list of input named first_name1,last_name2, dob1, pt_id
and if rows are more than one series will keep on move.
Javascript code as follows :
function transfer_values(field)
{
var len = new Array(field.length);
for (i = 0; i < field.length; i++)
{
var topic_id = new Array(field.length);
for (i = 0; i < field.length; i++)
if (field[i].checked == true)
{
//alert(field[i].id + field[i].value)
topic_id[i]=(field[i].id);
len[i]=(field[i].value);
//alert ("This is params value :" + (topic_id[i]));
//alert(topic_id[i]);
//alert("This is len :"+len[i]);
///////////////////////////
self.opener.document.forms[0].elements['x_insurance1'].value =
self.document.forms[0].elements['ins_id'+len[i]].value
//self.opener.document.forms[0].elements['x_last_name'].value =
self.document.forms[0].elements['last_name'+len[i]].value
//self.opener.document.forms[0].elements['x_first_name'].value =
self.document.forms[0].elements['first_name'+len[i]].value
//self.opener.document.forms[0].elements['x_dob'].value =
self.document.forms[0].elements['dob'+len[i]].value
//self.opener.document.forms[0].elements['x_deductible'].focus();
self.window.close()
}
}
}