Frage bez Formulareingaben prüfen(Vol.2) TUT

tfaScream

Grünschnabel
Hi,
wie in der Überschrift bereits erwähnt hab ich ne Frage bez. des Formulareingaben prüfen(Vol.2) Tutorials.

Und zwar hab ich dieses mitllerweile super in meine Website eingebaut. Hab jetzt nur ein problem. Und zwar hab ich quasi 2 Buttons in dieser Form.
Jetzt will ich aber mit nur mit einem Button (mit dem Finish Button)den Formcheck auslösen.
Mit dem Cancel Button soll die seite einfach verlassen werden.

Hab es bisher nur so gelöst bekommen indem ich den Finish-Button aus der Form genommen hab und onclick="return check_form(document.testform)" ausgelöst hab.

Denn kaum hab ich den onsubmit="return check_form(this)" in der eigentlichen Form drin lösen beide diese aktion aus.

Bin wirklich für jede hilfe dankbar.

Danke im Voraus
 
Hier mal der Quelltext der kompletten Seite:

Im Prinzip hab ich hier 2 Buttons.... der eine soll die Form prüfen und abschicken und der andere die seite verlassen. Diese wären hier in der function "KPN_ShowOutButton".

Hoffe du kannst damit was anfangen.

Hab auchnochmal auf einer test seite so ein scenarion nachgebildet. Und sobald ich den aufruf der checkform function ausserhalb der Form auf einen Button nehme kann ich mit dem Cancel Button die Seite verlassen und mit dem aussenliegenden Finishbutton wo der aufruf drin ist wird alles gecheckt. Und im Prinzip such ich nach einer Lösung diesen Finish Knopf auch in die Form zu nehmen... wie in diesem Beispiel.

Code:
<html>

<head>
<title>KPN TELECURE</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language='JavaScript' src='%%CSTE_WEBHOME%%w3i_script.js'></script>
<LINK REL=STYLESHEET TYPE="text/css" HREF="%%CSTE_WEBHOME%%w3i_style.css" TITLE="Style">

<SCRIPT LANGUAGE = "JavaScript">

var tstatus = new Array("Active", "Finished");
var tcontracttype = new Array("LOS", "Kortingskontract", "Servicekontract", "Kosteloos i.o.v. business");
var tsendtypeView = new Array("SMTP ((P)assword protected)", "SMTP ((S)ecure)", "SMTP ((U)nprotected)", "X400");
var tsendtypeCode = new Array("S(P)", "S(S)", "S(U)", "X400");
var tsystemtype = new Array("A", "I", "M", "C");

Date.prototype.equals = function(y, m, d){
   var bOK = false;
   var _year;
   if(!this.getFullYear){
      _year = this.getYear() + 1900;
   } else {
      _year = this.getFullYear();
   }
   var _month = this.getMonth();
   var _day = this.getDate();
        
   return (_year == y && _month == m && _day == d);
}

function KPN_ShowOutButton(pAction,pIndex,pImagePath) {
   document.write(" <div align='right'>");
   document.write("<table>");
   document.write("  <tr>");
   document.write("  <td>&nbsp;</td>");   
   document.write("  <td>&nbsp;</td>");
   document.write("    <td> ");
   if (pAction != "VIEW") {
       document.write("<input type='image' border='0' name='TERMINER' alt='Save and exit' src='" + pImagePath + "/KPN/terminer.gif'>");
   } else {
       document.write("&nbsp;");
   }
   document.write("  <input type='image' border='0' name='ANNULER' alt='Exit' src='" + pImagePath + "/KPN/annuler.gif'>");
   document.write("  </td>");
   document.write("  </tr>");
   document.write(" </table>");
   document.write(" </div>");
}

function KPN_CreateInput(pAction, pType, pObjectName, pObjectValue, pObjectSize, pObjectSizeMax) {
   var pTempString;
   var pAttribut;
   var pActualObjectValue;
   var pOnBlurText;

   pActualObjectValue = pObjectValue;
  
   pOnBlurText = "";
   if (pObjectName == "BASE_STARTDATE")
      {
      pActualObjectValue = DBDate2StandardDate(pActualObjectValue);
      pObjectName = pObjectName+"_EDIT";
      pOnBlurText = " onblur=\"KPN_OnBlurHandler('" + pObjectName + "')\"";
      }
   if (pObjectName == "BASE_ENDDATE")
      {
      pActualObjectValue = DBDate2StandardDate(pActualObjectValue);
      pObjectName = pObjectName+"_EDIT";
      pOnBlurText = " onblur=\"KPN_OnBlurHandler('" + pObjectName + "')\"";
      }
   if (pObjectName == "BASE_BCTSTARTDATE")
      {
      pActualObjectValue = DBDate2StandardDate(pActualObjectValue);
      pObjectName = pObjectName+"_EDIT";
      pOnBlurText = " onblur=\"KPN_OnBlurHandler('" + pObjectName + "')\"";
      }
   if (pObjectName == "BASE_BCTENDDATE")
      {
      pActualObjectValue = DBDate2StandardDate(pActualObjectValue);
      pObjectName = pObjectName+"_EDIT";
      pOnBlurText = " onblur=\"KPN_OnBlurHandler('" + pObjectName + "')\"";
      }

   if (pAction == "VIEW") {
	     if (pType == "password" && pObjectValue != "") {
		       pActualObjectValue = "*******";
	     }
	     pAttribut = "DISABLED";
   }
   pTempString = "<input type=\"" + pType + "\" name=\"" + pObjectName + "\" value=\"" + pActualObjectValue + "\" size='" + pObjectSize + "' maxlength='" + pObjectSizeMax + "' " + pAttribut + pOnBlurText + ">";
   document.write( pTempString );
}

function KPN_CreateCheckbox(pAction, pWebObjectName, pObjectName, pObjectTrueValue, pObjectFalseValue, pObjectSelection) {
   var pTempStringCHK;
   var pTempStringHID;
   var pTempStringJS;
   var pAttribut;
   
   if (pObjectSelection == "") {
       pObjectSelection = pObjectTrueValue;
   }
   pAttribut = "";
   if (pAction == "VIEW") {
	     pAttribut = "DISABLED";
   }

   pTempStringJS = "onClick=\"KPN_SetCheckboxValue(document.forme." + pWebObjectName + ", document.forme." + pObjectName + ", '" + pObjectTrueValue + "', '" + pObjectFalseValue + "')\"";
   if (pObjectTrueValue == pObjectSelection) {
	     pTempStringCHK = "<input type=\"checkbox\" CHECKED name=\"" + pWebObjectName + "\" value=\"" + pObjectTrueValue + "\" " + pTempStringJS + " " + pAttribut + ">";
	     pTempStringHID = "<input type=\"hidden\" name=\"" + pObjectName + "\" value=\"" + pObjectTrueValue + "\" " + pAttribut + ">";
   } else {
	     pTempStringCHK = "<input type=\"checkbox\" name=\"" + pWebObjectName + "\" value=\"" + pObjectFalseValue + "\" " + pTempStringJS + " " + pAttribut + ">";
	     pTempStringHID = "<input type=\"hidden\" name=\"" + pObjectName + "\" value=\"" + pObjectFalseValue + "\" " + pAttribut + ">";
   }
   document.write( pTempStringCHK );
   document.write( pTempStringHID );
}

function KPN_SetCheckboxValue(pWebObjectName, pObjectName, pObjectTrueValue, pObjectFalseValue) {
   if (pWebObjectName.checked) {
		   pObjectName.value = pObjectTrueValue;
   } else {
		   pObjectName.value = pObjectFalseValue;
	 }
}

function KPN_CreateListe(pAction, pObjectName, pArray, pSelection)  {
   var index = 0;
   var pTempString;
   var pAttribut;

   pAttribut = "";
   if (pAction == "VIEW") {
       pAttribut = "DISABLED";
   }
   pTempString = "<select name=\"" + pObjectName + "\" size=\"1\" " + pAttribut + " onchange=\"KPN_OnChangeHandler('" + pObjectName + "')\"" + ">";
   document.write( pTempString );
   while (index < pArray.length) {
	    if (pArray[index] == pSelection) {
		 pTempString = "<option SELECTED value=\"" + pArray[index] + "\">" + pArray[index] + "</option>";
	    } else {
		 pTempString = "<option value=\"" + pArray[index] + "\">" + pArray[index] + "</option>";
	    }
           document.write( pTempString );
           index=index+1;
   }
   document.write( "</select>" );
}

function KPN_CreateListeVal(pAction, pObjectName, pArrayView, pArrayCode, pSelection)  {
   var index = 0;
   var pTempString;
   var pAttribut;

   pAttribut = "";
   if (pAction == "VIEW") {
       pAttribut = "DISABLED";
   }
   pTempString = "<select name=\"" + pObjectName + "\" size=\"1\" " + pAttribut + " onchange=\"KPN_OnChangeHandler('" + pObjectName + "')\"" + ">";
   document.write( pTempString );
   while (index < pArrayCode.length) {
	    if (pArrayCode[index] == pSelection) {
		 pTempString = "<option SELECTED value=\"" + pArrayCode[index] + "\">" + pArrayView[index] + "</option>";
	    } else {
		 pTempString = "<option value=\"" + pArrayCode[index] + "\">" + pArrayView[index] + "</option>";
	    }
           document.write( pTempString );
           index=index+1;
   }
   document.write( "</select>" );
}

function KPN_SetDefaults(pAction)  {
   var now = new Date();

   KPN_OnChangeHandler("BASE_SENDTYPE")
   KPN_OnChangeHandler("BASE_CONTRACTTYPE")

   if (pAction == "CREAT")
       {
       pSystemDate = dezInt(now.getDate(),2,"0")+"."+dezInt((now.getMonth()+1),2,"0")+"."+dezInt(now.getYear(),4,"0");
       document.forme.BASE_STARTDATE_EDIT.value = pSystemDate;
       document.forme.BASE_STARTDATE.value = StandardDate2DBDate(pSystemDate);
       document.forme.BASE_BCTSTARTDATE_EDIT.value = pSystemDate;
       document.forme.BASE_BCTSTARTDATE.value = StandardDate2DBDate(pSystemDate);
       }
   if (pAction == "MODIF")
       {
       document.forme.BASE_STARTDATE_EDIT.disabled=true;
       }
   }

function KPN_OnChangeHandler(pObjectName)
   {

   if (pObjectName == "BASE_SENDTYPE")
       {
       if (document.forme.BASE_SENDTYPE.value=='X400')
           {   
           document.forme.BASE_SADDRESS2.value="";
           document.forme.BASE_SADDRESS2.disabled=true;
           document.forme.BASE_SADDRESS3.value="";
           document.forme.BASE_SADDRESS3.disabled=true;
           document.forme.BASE_SADDRESS4.value="";
           document.forme.BASE_SADDRESS4.disabled=true;
           document.forme.BASE_SADDRESS5.value="";
           document.forme.BASE_SADDRESS5.disabled=true;
           }
       else
           {
           document.forme.BASE_SADDRESS2.disabled=false;
           document.forme.BASE_SADDRESS3.disabled=false;
           document.forme.BASE_SADDRESS4.disabled=false;
           document.forme.BASE_SADDRESS5.disabled=false;
           }
       }
   if (pObjectName == "BASE_CONTRACTTYPE")
       {
       if (document.forme.BASE_CONTRACTTYPE.value=='LOS')
           {   
           document.forme.BASE_CUSTOMERNUMBER.disabled=false;
           document.forme.BASE_NOTABUNDLE.disabled=false;
           }
       else
           {
           document.forme.BASE_CUSTOMERNUMBER.value="";
           document.forme.BASE_CUSTOMERNUMBER.disabled=true;
           document.forme.BASE_NOTABUNDLE.value="";
           document.forme.BASE_NOTABUNDLE.disabled=true;
           }
       }
   if (pObjectName == "BASE_STATUS")
       {
       if (document.forme.BASE_STATUS.value=='Finished')
           {   
           var now = new Date();
           pSystemDate = dezInt(now.getDate(),2,"0")+"."+dezInt((now.getMonth()+1),2,"0")+"."+dezInt(now.getYear(),4,"0");
           document.forme.BASE_ENDDATE_EDIT.value = pSystemDate;
           document.forme.BASE_ENDDATE.value = StandardDate2DBDate(pSystemDate);
           document.forme.BASE_BCTENDDATE_EDIT.value = pSystemDate;
           document.forme.BASE_BCTENDDATE.value = StandardDate2DBDate(pSystemDate);
           }
       else
           {
           document.forme.BASE_ENDDATE_EDIT.value = "";
           document.forme.BASE_ENDDATE.value = "";
           document.forme.BASE_BCTENDDATE_EDIT.value = "";
           document.forme.BASE_BCTENDDATE.value = "";
           }
       }
   }

function KPN_OnBlurHandler(pObjectName)
   {
   var RegExpr_Datum = /^\d\d\.\d\d\.\d\d\d\d/;

   if (pObjectName == "BASE_STARTDATE_EDIT")
       {
       pDay = document.forme.BASE_STARTDATE_EDIT.value.substring(0, 2)
       pMonth = document.forme.BASE_STARTDATE_EDIT.value.substring(3, 5)
       pYear = document.forme.BASE_STARTDATE_EDIT.value.substring(6)
       var datum = new Date (pYear, pMonth-1, pDay)
       if (!RegExpr_Datum.test(document.forme.BASE_STARTDATE_EDIT.value))
           {
           document.forme.BASE_STARTDATE_EDIT.value = DBDate2StandardDate(document.forme.BASE_STARTDATE.value);
           }
       else
           {
          if (!datum.equals(pYear, pMonth-1, pDay))
              {
              document.forme.BASE_STARTDATE_EDIT.value = DBDate2StandardDate(document.forme.BASE_STARTDATE.value);
              }
          else
              {
              document.forme.BASE_STARTDATE.value = StandardDate2DBDate(document.forme.BASE_STARTDATE_EDIT.value);
              }
           }
       }
   if (pObjectName == "BASE_ENDDATE_EDIT")
       {
       pDay = document.forme.BASE_ENDDATE_EDIT.value.substring(0, 2)
       pMonth = document.forme.BASE_ENDDATE_EDIT.value.substring(3, 5)
       pYear = document.forme.BASE_ENDDATE_EDIT.value.substring(6)
       var datum = new Date (pYear, pMonth-1, pDay)
       if (!RegExpr_Datum.test(document.forme.BASE_ENDDATE_EDIT.value))
           {
           document.forme.BASE_ENDDATE_EDIT.value = DBDate2StandardDate(document.forme.BASE_ENDDATE.value);
           }
       else
           {
           if (!datum.equals(pYear, pMonth-1, pDay))
               {
               document.forme.BASE_ENDDATE_EDIT.value = DBDate2StandardDate(document.forme.BASE_ENDDATE.value);
               }
           else
               {
               document.forme.BASE_ENDDATE.value = StandardDate2DBDate(document.forme.BASE_ENDDATE_EDIT.value);
               }
           }
       }
   if (pObjectName == "BASE_BCTSTARTDATE_EDIT")
       {
       pDay = document.forme.BASE_BCTSTARTDATE_EDIT.value.substring(0, 2)
       pMonth = document.forme.BASE_BCTSTARTDATE_EDIT.value.substring(3, 5)
       pYear = document.forme.BASE_BCTSTARTDATE_EDIT.value.substring(6)
       var datum = new Date (pYear, pMonth-1, pDay)
       if (!RegExpr_Datum.test(document.forme.BASE_BCTSTARTDATE_EDIT.value))
           {
           document.forme.BASE_BCTSTARTDATE_EDIT.value = DBDate2StandardDate(document.forme.BASE_BCTSTARTDATE.value);
           }
       else
           {
           if (!datum.equals(pYear, pMonth-1, pDay))
               {
               document.forme.BASE_BCTSTARTDATE_EDIT.value = DBDate2StandardDate(document.forme.BASE_BCTSTARTDATE.value);
               }
           else
               {
               document.forme.BASE_BCTSTARTDATE.value = StandardDate2DBDate(document.forme.BASE_BCTSTARTDATE_EDIT.value);
               }
           }
       }
   if (pObjectName == "BASE_BCTENDDATE_EDIT")
       {
       pDay = document.forme.BASE_BCTENDDATE_EDIT.value.substring(0, 2)
       pMonth = document.forme.BASE_BCTENDDATE_EDIT.value.substring(3, 5)
       pYear = document.forme.BASE_BCTENDDATE_EDIT.value.substring(6)
       var datum = new Date (pYear, pMonth-1, pDay)
       if (!RegExpr_Datum.test(document.forme.BASE_BCTENDDATE_EDIT.value))
           {
           document.forme.BASE_BCTENDDATE_EDIT.value = DBDate2StandardDate(document.forme.BASE_BCTENDDATE.value);
           }
       else
           {
           if (!datum.equals(pYear, pMonth-1, pDay))
               {
               document.forme.BASE_BCTENDDATE_EDIT.value = DBDate2StandardDate(document.forme.BASE_BCTENDDATE.value);
               }
           else
               {
               document.forme.BASE_BCTENDDATE.value = StandardDate2DBDate(document.forme.BASE_BCTENDDATE_EDIT.value);
               }
           }
       }
   }

   
//Standard-Fehlermeldung
strMsg='Fehler';

arrFields=new Array();

arrFields['BASE_HEBNUMBER']      = new Array(1,/^[0-9]{1,6}/,'Bitte geben Sie die HEB_Number ein und verwenden Sie nur Zahlen');
arrFields['BASE_NAME']           = new Array(1,/^.{1,20}/,'Bitte geben Sie Ihren Namen ein');
arrFields['BASE_CONTACT']        = new Array(1,/^.{1,30}/,'Bitte geben Sie eine Kontaktperson ein');
arrFields['BASE_ADDRESS']        = new Array(1,/^.{1,40}/,'Bitte geben Sie eine Adresse ein');
arrFields['BASE_POSTALCODE']     = new Array(1,/^[0-9]{4}([a-z]|[A-Z]){2}/,'Bitte geben Sie eine Postleitzahl im Format NNNNCC ein');
arrFields['BASE_CITY']           = new Array(1,/^.{1,25}/,'Bitte geben Sie eine Stadt ein');
arrFields['BASE_CONTACTMAIL']    = new Array(0,/^[a-z\d][a-z\d\._-]*@([a-z\d][a-z\d\.-]*[a-z\d]\.|)[a-z\d][a-z\d-]{1,}[a-z\d]\.[a-z]{2,5}$/i,'Geben Sie bitte Ihre eMail Adresse richtig an');
arrFields['BASE_TELEPHONE']      = new Array(1,/^[0-9]{1,10}/,'Bitte geben Sie eine Telefonnummer ein')
arrFields['BASE_BCTNUMBER']      = new Array(1,/^[0-9]{1,13}/,'Bitte geben Sie eine BCT Number ein')
arrFields['BASE_SADDRESS1']      = new Array(1,/^.{1,100}$/,'Bitte geben Sie die Sendeadresse ein');


    /** Überflüssige Leerzeichen entfernen */

    function trim(strIn)
    {

    return(strIn.replace(/(^\s+|\s+$)/g,''));

    }

    function DBDate2StandardDate(strIn)
    {
    if (strIn == '') {
       return '';
    } else {
       return strIn.substring(8)+"."+strIn.substring(5,7)+"."+strIn.substring(0,4);
    }
    }

    function StandardDate2DBDate(strIn)
    {
    if (strIn == '') {
       return '';
    } else {
       return strIn.substring(6)+"."+strIn.substring(3,5)+"."+strIn.substring(0,2);
    }
    }

    function dezInt(num,size,prefix) { 
       prefix=(prefix)?prefix:"0"; 
       var minus=(num<0)?"-":"", result=(prefix=="0")?minus:""; 
       num=Math.abs(parseInt(num,10)); 
       size-=(""+num).length; 
       for(var i=1;i<=size;i++) { result+=""+prefix; } 
       result+=((prefix!="0")?minus:"")+num;
       return result;
    }

    /** text-input und textarea prüfen */

    function text_check(objElem, arrCheck)
    {

    objElem.value=trim(objElem.value);

    if (arrCheck[0] || objElem.value.length > 0)
        {
        if (!objElem.value.match(arrCheck[1]))
            {
            alert((arrCheck.length == 3) ? arrCheck[2] : strMsg );
            objElem.select();
            objElem.focus();
            return false;
            }
        }
    return true;

    }


    /** boxes checken */

    function box_check(objElem, arrCheck)
    {

    intChecked = 0;
    arrBoxes=(typeof objElem.form.elements[objElem.name].length == 'number')
                ?objElem.form.elements[objElem.name]
                :new Array(objElem);

    for (e = 0; e < arrBoxes.length; ++e)
        {
        intChecked+=(arrBoxes[e].checked) ? 1 : 0
        }

    if (!eval('intChecked' + arrCheck[1]))
           {
           alert((arrCheck.length == 3) ? arrCheck[2] : strMsg);
           arrBoxes[0].focus();
           return false;
           }
    return true;

    }


    /** Listen checken */

    function list_check(objElem, arrCheck)
    {
    if(!eval('objElem.selectedIndex' + arrCheck[1]))
        {
        alert((arrCheck.length == 3) ? arrCheck[2] : strMsg );
        objElem.focus();
        return false;
        }
    return true;
    }


    /** befindet sich objElem in objForm? */

    function in_form(objElem,objForm)
    {

    return(typeof objElem.form=='object' && objElem.form==objForm);

    }

    /** zu prüfende Formularelemente ermitteln */



    function get_field_type(objElem)
    {

    switch (objElem.tagName.toLowerCase())
        {
        case "input":
            switch(objElem.type)
                {
                case "text":
                    strFieldType='text';
                    break;

                case "password":
                    strFieldType='text';
                    break;

                case "file":
                    strFieldType='text';
                    break;

                case "radio":
                    strFieldType='box';
                    break;

                case "checkbox":
                    strFieldType='box';
                    break;

                default:
                    strFieldType=false;
                    break;
                }
            break;

        case "select":
                strFieldType='list';
                break;

        case "textarea":
                strFieldType='text';
                break;

        default:
                strFieldType=false;
                break;
        }
    return strFieldType;

    }

    function check_form(objForm)
    {
    if  (!document.getElementsByName)
        {

        return true;

        }

    for (var strName in arrFields)
        {

        for(j=0;j<document.getElementsByName(strName).length;++j)
            {

            objElem=document.getElementsByName(strName)[j];

            if(in_form(objElem,objForm))
                {

                if(!eval(get_field_type(objElem)+'_check(objElem,arrFields[strName])'))
                    {

                    return false;

                    }
                if(get_field_type(objElem)=='box')
                    {

                    continue;

                    }
                }
            }
        }

    alert( 'Alle erforderlichen Angaben bestätigt');
    return true;

    }

</SCRIPT>

</head>

<body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>
<form name="forme" onsubmit="return check_form(this)" method="%%CSTE_WEBFORMS%%" action="%%CSTE_SCRIPT%%">
<INPUT TYPE=HIDDEN NAME="KEY" VALUE="%%CSTE_KEY%%">
<INPUT TYPE=HIDDEN NAME="ACTION" VALUE="%%CSTE_W3ACTION%%">
<INPUT TYPE=HIDDEN NAME="BASE_STARTDATE" VALUE="%%BASE_STARTDATE%%">
<INPUT TYPE=HIDDEN NAME="BASE_ENDDATE" VALUE="%%BASE_ENDDATE%%">
<INPUT TYPE=HIDDEN NAME="BASE_BCTSTARTDATE" VALUE="%%BASE_BCTSTARTDATE%%">
<INPUT TYPE=HIDDEN NAME="BASE_BCTENDDATE" VALUE="%%BASE_BCTENDDATE%%">

<table border="0" cellspacing="0" cellpadding="0">

<tr>
<td>
<script language="JavaScript">
KPN_ShowOutButton("%%CSTE_W3ACTION%%","%%CSTE_INDEX%%","%%CSTE_IMAGES%%")
</script>
</td>
</tr>

</table>

<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1">
<tr>
<td colspan='6'>
&nbsp;
</td>
</tr>

<tr>
<td class="nocolorpage">
HEB-Number :
</td>
<td class="nocolorpage">
<script language="JavaScript">
KPN_CreateInput("%%CSTE_W3ACTION%%","text","BASE_HEBNUMBER",'%%BASE_HEBNUMBER%%',"6","6")
</script>
</td>
</tr>

<tr>
<td class="nocolorpage">
Name :
</td>
<td class="nocolorpage">
<script language="JavaScript">
KPN_CreateInput("%%CSTE_W3ACTION%%","text","BASE_NAME",'%%BASE_NAME%%',"30","30")
</script>
</td>
</tr>

<tr>
<td class="nocolorpage">
Contact :
</td>
<td class="nocolorpage">
<script language="JavaScript">
KPN_CreateInput("%%CSTE_W3ACTION%%","text","BASE_CONTACT",'%%BASE_CONTACT%%',"30","30")
</script>
</td>
</tr>

<tr>
<td class="nocolorpage">
Address :
</td>
<td class="nocolorpage">
<script language="JavaScript">
KPN_CreateInput("%%CSTE_W3ACTION%%","text","BASE_ADDRESS",'%%BASE_ADDRESS%%',"40","40")
</script>
</td>
</tr>

<tr>
<td class="nocolorpage">
Postal Code :
</td>
<td class="nocolorpage">
<script language="JavaScript">
KPN_CreateInput("%%CSTE_W3ACTION%%","text","BASE_POSTALCODE",'%%BASE_POSTALCODE%%',"6","6")
</script>
</td>
</tr>

<tr>
<td class="nocolorpage">
City :
</td>
<td class="nocolorpage">
<script language="JavaScript">
KPN_CreateInput("%%CSTE_W3ACTION%%","text","BASE_CITY",'%%BASE_CITY%%',"25","25")
</script>
</td>
</tr>

<tr>
<td class="nocolorpage">
Contact Mail :
</td>
<td class="nocolorpage">
<script language="JavaScript">
KPN_CreateInput("%%CSTE_W3ACTION%%","text","BASE_CONTACTMAIL",'%%BASE_CONTACTMAIL%%',"50","50")
</script>
</td>
</tr>

<tr>
<td class="nocolorpage">
CKR :
</td>
<td class="nocolorpage">
<script language="JavaScript">
KPN_CreateInput("%%CSTE_W3ACTION%%","text","BASE_CKR",'%%BASE_CKR%%',"8","8")
</script>
</td>
</tr>

<tr>
<td class="nocolorpage">
Telephone :
</td>
<td class="nocolorpage">
<script language="JavaScript">
KPN_CreateInput("%%CSTE_W3ACTION%%","text","BASE_TELEPHONE",'%%BASE_TELEPHONE%%',"10","10")
</script>
</td>
</tr>

<tr>
<td class="nocolorpage">
Remarks :
</td>
<td class="nocolorpage">
<script language="JavaScript">
KPN_CreateInput("%%CSTE_W3ACTION%%","text","BASE_REMARKS",'%%BASE_REMARKS%%',"250","250")
</script>
</td>
</tr>

 <tr>
 <td class="nocolorpage">
Factuur Manager available :
</td>
<td class="nocolorpage"> 
<script language="JavaScript">
KPN_CreateCheckbox("%%CSTE_W3ACTION%%","fmanager", "BASE_FMANAGER", "Y", "N", "%%BASE_FMANAGER%%")
</script>
</td>
</tr>

<tr> 
<td class="nocolorpage">
Status :
</td>
<td class="nocolorpage"> 
<script language="JavaScript">
KPN_CreateListe("%%CSTE_W3ACTION%%","BASE_STATUS", tstatus, "%%BASE_STATUS%%")
</script>
</td>
</tr>

<tr>
<td class="nocolorpage">
Startdate :
</td>
<td class="nocolorpage">
<script language="JavaScript">
KPN_CreateInput("%%CSTE_W3ACTION%%","text","BASE_STARTDATE",'%%BASE_STARTDATE%%',"10","10")
</script>
</td>
</tr>

<tr>
<td class="nocolorpage">
Enddate :
</td>
<td class="nocolorpage">
<script language="JavaScript">
KPN_CreateInput("%%CSTE_W3ACTION%%","text","BASE_ENDDATE",'%%BASE_ENDDATE%%',"10","10")
</script>
</td>
</tr

<tr> 
<td class="nocolorpage">
Contract Type :
</td>
<td class="nocolorpage"> 
<script language="JavaScript">
KPN_CreateListe("%%CSTE_W3ACTION%%","BASE_CONTRACTTYPE", tcontracttype, "%%BASE_CONTRACTTYPE%%")
</script>
</td>
</tr>

<tr>
<td class="nocolorpage">
Customer number :
</td>
<td class="nocolorpage">
<script language="JavaScript">
KPN_CreateInput("%%CSTE_W3ACTION%%","text","BASE_CUSTOMERNUMBER",'%%BASE_CUSTOMERNUMBER%%',"30","30")
</script>
</td>
</tr

<tr>
<td class="nocolorpage">
Nota bundle :
</td>
<td class="nocolorpage">
<script language="JavaScript">
KPN_CreateInput("%%CSTE_W3ACTION%%","text","BASE_NOTABUNDLE",'%%BASE_NOTABUNDLE%%',"30","30")
</script>
</td>
</tr

<tr> 
<td class="nocolorpage">
System type :
</td>
<td class="nocolorpage"> 
<script language="JavaScript">
KPN_CreateListe("%%CSTE_W3ACTION%%","BASE_BCTSYSTEM", tsystemtype, "%%BASE_BCTSYSTEM%%")
</script>
</td>
</tr>

<tr>
<td class="nocolorpage">
BCT number :
</td>
<td class="nocolorpage">
<script language="JavaScript">
KPN_CreateInput("%%CSTE_W3ACTION%%","text","BASE_BCTNUMBER",'%%BASE_BCTNUMBER%%',"12","12")
</script>
</td>
</tr

<tr>
<td class="nocolorpage">
BCT Startdate :
</td>
<td class="nocolorpage">
<script language="JavaScript">
KPN_CreateInput("%%CSTE_W3ACTION%%","text","BASE_BCTSTARTDATE",'%%BASE_BCTSTARTDATE%%',"10","10")
</script>
</td>
</tr>

<tr>
<td class="nocolorpage">
BCT Enddate :
</td>
<td class="nocolorpage">
<script language="JavaScript">
KPN_CreateInput("%%CSTE_W3ACTION%%","text","BASE_BCTENDDATE",'%%BASE_BCTENDDATE%%',"10","10")
</script>
</td>
</tr

<tr> 
<td class="nocolorpage">
Sending type :
</td>
<td class="nocolorpage"> 
<script language="JavaScript">
KPN_CreateListeVal("%%CSTE_W3ACTION%%","BASE_SENDTYPE", tsendtypeView, tsendtypeCode, "%%BASE_SENDTYPE%%")
</script>
</td>
</tr>

<tr>
<td class="nocolorpage">
Connection ID :
</td>
<td class="nocolorpage">
<script language="JavaScript">
KPN_CreateInput("%%CSTE_W3ACTION%%","text","BASE_CONNECTIONID",'%%BASE_CONNECTIONID%%',"6","6")
</script>
</td>
</tr

<tr>
<td class="nocolorpage">
Send Address 1 :
</td>
<td class="nocolorpage">
<script language="JavaScript">
KPN_CreateInput("%%CSTE_W3ACTION%%","text","BASE_SADDRESS1",'%%BASE_SADDRESS1%%',"100","100")
</script>
</td>
</tr

<tr>
<td class="nocolorpage">
Send Address 2 :
</td>
<td class="nocolorpage">
<script language="JavaScript">
KPN_CreateInput("%%CSTE_W3ACTION%%","text","BASE_SADDRESS2",'%%BASE_SADDRESS2%%',"100","100")
</script>
</td>
</tr

<tr>
<td class="nocolorpage">
Send Address 3 :
</td>
<td class="nocolorpage">
<script language="JavaScript">
KPN_CreateInput("%%CSTE_W3ACTION%%","text","BASE_SADDRESS3",'%%BASE_SADDRESS3%%',"100","100")
</script>
</td>
</tr

<tr>
<td class="nocolorpage">
Send Address 4 :
</td>
<td class="nocolorpage">
<script language="JavaScript">
KPN_CreateInput("%%CSTE_W3ACTION%%","text","BASE_SADDRESS4",'%%BASE_SADDRESS4%%',"100","100")
</script>
</td>
</tr

<tr>
<td class="nocolorpage">
Send Address 5 :
</td>
<td class="nocolorpage">
<script language="JavaScript">
KPN_CreateInput("%%CSTE_W3ACTION%%","text","BASE_SADDRESS5",'%%BASE_SADDRESS5%%',"100","100")
KPN_SetDefaults("%%CSTE_W3ACTION%%")
</script>
</td>
</tr

</form>
</body>

</html>
 
Naja...beide Buttons dort sind vom Type "image", veranlassen also, dass das Formular gesendet wird. Beim onsubmit() wird dann halt die Funktion zum Checken aufgerufen.

Wenn du jetzt als Exit-Button einfach das Bild einbindest und es verlinkst, wird nichts gesendet, also auch nichts gecheckt beim Verlassen der Seite.
 

Neue Beiträge

Zurück