Beispiel #1
0
  static public function buildJavascript($tableName, array $columns) 
  {
    echo "
function SetValues_$tableName(id,disabled) 
{
var Field_id = new Array(0,";
    echo AnyTable::getData($tableName, 'id');
    echo ");
     ";

    foreach($columns as $column):
      echo"var Field_$column = new Array(0,";
      echo AnyTable::getData($tableName, $column);
      echo ");
       ";
    endforeach;

    echo"
if(Field_id[id])
{
";
    foreach($columns as $column)
      echo "document.getElementById('$column').value = Field_".$column."[id];
      if(disabled) document.getElementById('$column').disabled = true;
      ";
    echo"}
    if(id==0)
{";
    foreach($columns as $column)
      echo"  document.getElementById('$column').value = '';
      if(disabled) document.getElementById('$column').disabled = false;
      ";
    echo "}
}";
  }
Beispiel #2
0
}
$fields=transform('`transfer_agent` ,`postal_address` ,`postal_address_I` ,`phone_number` ,`account_number` ,`key_contact_persons` ,`email_address` ,`fax_no` ,`additional_information`,`zip`');
AnyTable::buildJavascript('transfer_agent', $fields);
$transfer_agents = AnyTable::getData('transfer_agent');

$fields=transform('`custodian` ,`postal_address_a` ,`postal_address_b` ,`zip_city` ,`key_contact_person_a_cu` ,`email_address_a` ,`key_contact_person_b` ,`email_address_b` ,`phone_number_cu` ,`fax_number` ,`settlement_details_a` ,`settlement_details_b` ,`settlement_details_c`,`account_number_cu`');
AnyTable::buildJavascript('custodian', $fields);
$custodians= AnyTable::getData('custodian');

$fields=transform('`fund_advisor` ,`postal_address_adv` ,`postal_address_adv_I` ,`phone_number_adv` ,`email_address_adv` ,`fax_number_adv` ,`additional_information_adv`,`zip_city_adv`');
AnyTable::buildJavascript('fund_advisor', $fields);
$fund_advisors = AnyTable::getData('fund_advisor');

$fields=transform('`fund_auditor` ,`postal_address_fau` ,`postal_address_fau_I` ,`phone_number_fau` ,`email_address_fau` ,`fax_number_fau` ,`additional_information_fau`,`zip_city_fau`');
AnyTable::buildJavascript('fund_auditor', $fields);
$fund_auditors= AnyTable::getData('fund_auditor');

$result=array();
?>

function verify() 
{
  if((document.getElementById('amount1').value == parseInt(document.getElementById('amount1').value))&&(document.getElementById('amount2').value == parseInt(document.getElementById('amount2').value)))
    document.createT.submit();
  else{
    alert('AMOUNT MUST BE NUMERIC!');	
    return false;}
}
function switc(val) 
{
  document.getElementById('xxx').style.visibility = (val == 'switch') ? 'visible' : 'hidden';