home *** CD-ROM | disk | FTP | other *** search
- <!-- to hide script contents from old browsers
-
-
-
- function go()
- {
- if (parent.parent.globals.document.vars.editMode.value == "yes")
- return true;
- else
- return(checkData());
- }
-
-
-
- function checkData()
- {
- if (document.forms[0].first.value == "") {
- alert("You must enter a first name.");
- document.forms[0].first.focus();
- document.forms[0].first.select();
- return false;
- }
- if (document.forms[0].last.value == "") {
- alert("You must enter a last name.");
- document.forms[0].last.focus();
- document.forms[0].last.select();
- return false;
- }
- /*
- if (document.forms[0].areaCode.value == "") {
- alert("You must enter an area code.");
- document.forms[0].areaCode.focus();
- document.forms[0].areaCode.select();
- return false;
- }
- if (document.forms[0].phoneNumber.value == "") {
- alert("You must enter a telephone number.");
- document.forms[0].phoneNumber.focus();
- document.forms[0].phoneNumber.select();
- return false;
- }
- */
- return true;
- }
-
-
-
- function loadData()
- {
- // make sure all data objects/element exists and valid; otherwise, reload. SUCKS!
- if (((document.forms[0].first == "undefined") || (document.forms[0].first == "[object InputArray]")) ||
- ((document.forms[0].last == "undefined") || (document.forms[0].last == "[object InputArray]")) ||
- ((document.forms[0].company == "undefined") || (document.forms[0].company == "[object InputArray]")))
- {
- parent.controls.reloadDocument();
- return;
- }
-
- document.forms[0].first.value = parent.parent.globals.document.vars.first.value;
- document.forms[0].last.value = parent.parent.globals.document.vars.last.value;
- document.forms[0].company.value = parent.parent.globals.document.vars.company.value;
- // document.forms[0].areaCode.value = parent.parent.globals.document.vars.areaCode.value;
- // document.forms[0].phoneNumber.value = parent.parent.globals.document.vars.phoneNumber.value;
- parent.parent.globals.setFocus(document.forms[0].first);
- if (parent.controls.generateControls) parent.controls.generateControls();
- }
-
-
-
- function saveData()
- {
- // make sure all form element are valid objects, otherwise just skip & return!
- if (((document.forms[0].first == "undefined") || (document.forms[0].first == "[object InputArray]")) ||
- ((document.forms[0].last == "undefined") || (document.forms[0].last == "[object InputArray]")) ||
- ((document.forms[0].company == "undefined") || (document.forms[0].company == "[object InputArray]")))
- {
- parent.controls.reloadDocument();
- return;
- }
-
- parent.parent.globals.document.vars.first.value = document.forms[0].first.value;
- parent.parent.globals.document.vars.last.value = document.forms[0].last.value;
- parent.parent.globals.document.vars.company.value = document.forms[0].company.value;
- // parent.parent.globals.document.vars.areaCode.value = document.forms[0].areaCode.value;
- // parent.parent.globals.document.vars.phoneNumber.value = document.forms[0].phoneNumber.value;
- }
-
-
-
- // end hiding contents from old browsers -->
-