fixed javascript error which cause submit in uicontacts::view, when you click on [more ...]

This commit is contained in:
Ralf Becker 2005-11-14 17:29:39 +00:00
parent 86edef2bfe
commit 0b8dbfcdd1

View File

@ -283,27 +283,32 @@ class uicontacts extends bocontacts
{
return '<script LANGUAGE="JavaScript">
function showphones(form){
function showphones(form)
{
set_style_by_class("table","editphones","display","inline");
if (form) {
copyvalues(form,"tel_home","tel_home2");
copyvalues(form,"tel_work","tel_work2");
copyvalues(form,"tel_cell","tel_cell2");
return;
}
}
function hidephones(form){
function hidephones(form)
{
set_style_by_class("table","editphones","display","none");
if (form) {
copyvalues(form,"tel_home2","tel_home");
copyvalues(form,"tel_work2","tel_work");
copyvalues(form,"tel_cell2","tel_cell");
return;
}
}
function copyvalues(form,src,dst){
var srcelement = getElement(form,src); //ById("exec["+src+"]");
var dstelement = getElement(form,dst); //ById("exec["+dst+"]");
if (srcelement && dstelement) {
dstelement.value = srcelement.value;
return;
}
}
function getElement(form,pattern){