"Dynamische" Formulare

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • "Dynamische" Formulare

    Hallo,

    ich habe folgendes vor:

    Ich möchte ein Formular, dass wie folgt "funktionieren" sollte:

    Man stelle sich zwei Eingabefelder A und B vor sowie zwei Radiobuttons X und Y.

    Dass es möglich ist, weiss ich.. nur wie?

    Also: Wenn Radiobutton X aktiviert ist soll NUR Feld A beschreibbar sein (B dekativiert --> disabled) und wenn Y aktiviert ist soll B aktiviert sein und A deaktiviert..

    Hoffe, jemand kann mir den entsprechenden Java-Script-Code geben

    Als kleines Beispiel:

    https://w3.payboxcenter.de/pushpaybo...o=49000PUSHPBX

    Dort ist glaub ich recht schön verdeutlicht, was ich meine

    MfG
    Zuletzt geändert von tanjix; 06.10.2002, 17:19.

  • #2
    Das funktioniert nur mit dem IE ... deshalb wird's bei Paybox auf für IE und NS unterschiedlich gehandelt ... ansonsten heißt das Attribute "Disabled" und muß auf "true" gesetzt werden.

    document.frmFormular.txtInput.disabled=true;
    carpe noctem

    [color=blue]Bitte keine Fragen per EMail ... im Forum haben alle was davon ... und ich beantworte EMail-Fragen von Foren-Mitgliedern in der Regel eh nicht![/color]
    [color=red]Hinweis: Ich bin weder Mitglied noch Angestellter von ebiz-consult! Alles was ich hier von mir gebe tue ich in eigener Verantwortung![/color]

    Kommentar


    • #3
      PS JavascriptFunktion die Paybox verwendet ...

      function mobileNo () {

      bank = false;
      phone = true;

      if(document.pushing.payeeBankAccountNo_P1){
      document.pushing.payeeBankAccountNo_P1.value="";
      document.pushing.payeeBankAccountNo_P1.disabled=true;
      changeColGrey("payeeBankAccountNo_txt");
      changeColGrey("payeeBankAccountNo1_txt");
      }
      if(document.pushing.payeeBankAccountNo_P2){
      document.pushing.payeeBankAccountNo_P2.value="";
      document.pushing.payeeBankAccountNo_P2.disabled=true;
      changeColGrey("payeeBankAccountNo2_txt");
      }
      if(document.pushing.payeeBankAccountNo_P3){
      document.pushing.payeeBankAccountNo_P3.value="";
      document.pushing.payeeBankAccountNo_P3.disabled=true;
      changeColGrey("payeeBankAccountNo3_txt");
      }
      if(document.pushing.payeeBankAccountNo_P4){
      document.pushing.payeeBankAccountNo_P4.value="";
      document.pushing.payeeBankAccountNo_P4.disabled=true;
      changeColGrey("payeeBankAccountNo4_txt");
      }
      if(document.pushing.payeeBankName)
      {
      document.pushing.payeeBankName.value="";
      document.pushing.payeeBankName.disabled=true;
      changeColGrey("payeeBankName_txt");
      }
      changeColGrey("payeeBankName_txt");
      changeColGrey("payeeBankName");
      if(document.pushing.payeeName)
      {
      document.pushing.payeeName.value="";
      document.pushing.payeeName.disabled=true;
      changeColGrey("payeeName_txt");
      changeColGrey("examplepayeeName_txt");
      }
      if(document.pushing.payeeBankCode)
      {
      document.pushing.payeeBankCode.value="";
      document.pushing.payeeBankCode.disabled=true;
      changeColGrey("payeeBankCode_txt");
      }
      if(document.pushing.payeeBankAccountNo)
      {
      document.pushing.payeeBankAccountNo.value="";
      document.pushing.payeeBankAccountNo.disabled=true;
      changeColGrey("payeeBankAccountNo_txt");
      }
      if(document.pushing.referenceField1)
      {
      document.pushing.referenceField1.value="";
      document.pushing.referenceField1.disabled=true;
      changeColGrey("referenceField1_txt");
      }
      if(document.pushing.referenceField2)
      {
      document.pushing.referenceField2.value="";
      document.pushing.referenceField2.disabled=true;
      changeColGrey("referenceField2_txt");
      }
      if(document.pushing.payeeBankGiro)
      {
      document.pushing.payeeBankGiro.value="";
      document.pushing.payeeBankGiro.disabled=true;
      changeColGrey("payeeBankGiro_txt");
      }
      if(document.pushing.payeeOCR)
      {
      document.pushing.payeeOCR.value="";
      document.pushing.payeeOCR.disabled=true;
      changeColGrey("payeeOCR_txt");
      }
      if(document.pushing.payeeStreet1)
      {
      document.pushing.payeeStreet1.value="";
      document.pushing.payeeStreet1.disabled=true;
      changeColGrey("payeeStreet1_txt");
      }
      if(document.pushing.payeeStreet2)
      {
      document.pushing.payeeStreet2.value="";
      document.pushing.payeeStreet2.disabled=true;
      changeColGrey("payeeStreet2_txt");
      }
      if(document.pushing.payeeZipCode)
      {
      document.pushing.payeeZipCode.value="";
      document.pushing.payeeZipCode.disabled=true;
      changeColGrey("payeeZipCode_txt");
      }
      if(document.pushing.payeeCity)
      {
      document.pushing.payeeCity.value="";
      document.pushing.payeeCity.disabled=true;
      changeColGrey("payeeCity_txt");
      }
      if(document.pushing.payeeState)
      {
      document.pushing.payeeState.value="";
      document.pushing.payeeState.disabled=true;
      changeColGrey("payeeState_txt");
      }
      if(document.pushing.payeeCountry)
      {
      document.pushing.payeeCountry.value="";
      document.pushing.payeeCountry.disabled=true;
      changeColGrey("payeeCountry_txt");
      }
      if(document.pushing.payeeBankCity)
      {
      document.pushing.payeeBankCity.value="";
      document.pushing.payeeBankCity.disabled=true;
      changeColGrey("payeeBankCity_txt");
      }

      document.pushing.payeePayboxNumber1.disabled=false;
      document.pushing.payeePayboxNumber2.disabled=false;
      changeColNorm("payeePayboxNumber1_txt");
      changeColNorm("examplepayee_txt");

      if(document.getElementById){
      window.document.getElementById("tbl_p2b_inputs").style.backgroundColor="#FFFFFF";
      //window.document.getElementById("tbl_p2b_imgt").src="/_content_images/cont_subtitleGr_top.gif";
      //window.document.getElementById("tbl_p2b_imgt").style.visibility="visible";
      //window.document.getElementById("tbl_p2b_imgb").src="/_content_images/cont_subtitleGr_bottom.gif";
      //window.document.getElementById("tbl_p2b_imgb").style.visibility="visible";

      window.document.getElementById("tbl_p2b_imgt").style.visibility="hidden";
      window.document.getElementById("tbl_p2b_imgb").style.visibility="hidden";
      //window.document.getElementById("tbl_p2b_inputs").style.visibility="hidden";
      //window.document.getElementById("tbl_p2b_inputs").style.display="none";

      window.document.getElementById("tbl_p2p_inputs").style.backgroundColor="#ffd799";
      window.document.getElementById("tbl_p2p_imgt").src="/_content_images/cont_subtitle_top.gif";
      window.document.getElementById("tbl_p2p_imgt").style.visibility="visible";
      window.document.getElementById("tbl_p2p_imgb").src="/_content_images/cont_subtitle_bottom.gif";
      window.document.getElementById("tbl_p2p_imgb").style.visibility="visible";
      window.document.getElementById("tbl_p2p_inputs").style.visibility="visible";
      window.document.getElementById("tbl_p2p_inputs").style.display="block";
      }
      else if(document.all){
      window.document.all["tbl_p2b_inputs"].style.backgroundColor="#ffffff";
      //window.document.all["tbl_p2b_imgt"].src="/_content_images/cont_subtitleGr_top.gif";
      //window.document.all["tbl_p2b_imgt"].style.visibility="visible";
      //window.document.all["tbl_p2b_imgb"].src="/_content_images/cont_subtitleGr_bottom.gif";
      //window.document.all["tbl_p2b_imgb"].style.visibility="visible";

      window.document.all["tbl_p2b_imgt"].style.visibility="hidden";
      window.document.all["tbl_p2b_imgb"].style.visibility="hidden";
      //window.document.all["tbl_p2b_inputs"].style.visibility="hidden";
      //window.document.all["tbl_p2b_inputs"].style.display="none";

      window.document.all["tbl_p2p_inputs"].style.backgroundColor="#ffd799";
      window.document.all["tbl_p2p_imgt"].src="/_content_images/cont_subtitle_top.gif";
      window.document.all["tbl_p2p_imgt"].style.visibility="visible";
      window.document.all["tbl_p2p_imgb"].src="/_content_images/cont_subtitle_bottom.gif";
      window.document.all["tbl_p2p_imgb"].style.visibility="visible";
      window.document.all["tbl_p2p_inputs"].style.visibility="visible";
      window.document.all["tbl_p2p_inputs"].style.display="block";
      }
      // else{
      // window.document.layers["tbl_p2b_inputs"].backgroundColor="#ffffff";
      // window.document.layers["tbl_p2b_imgt"].visibility="hidden";
      // window.document.layers["tbl_p2b_imgb"].visibility="hidden";
      // //window.document.layers["tbl_p2b_inputs"].visibility="hidden";
      // //window.document.layers["tbl_p2b_inputs"].display="none";
      //
      // window.document.layers["tbl_p2p_inputs"].backgroundColor="#ffd799";
      // window.document.layers["tbl_p2p_imgt"].visibility="visible";
      // window.document.layers["tbl_p2p_imgb"].visibility="visible";
      // window.document.all["tbl_p2p_inputs"].visibility="visible";
      // window.document.all["tbl_p2p_inputs"].display="block";
      // }

      }
      carpe noctem

      [color=blue]Bitte keine Fragen per EMail ... im Forum haben alle was davon ... und ich beantworte EMail-Fragen von Foren-Mitgliedern in der Regel eh nicht![/color]
      [color=red]Hinweis: Ich bin weder Mitglied noch Angestellter von ebiz-consult! Alles was ich hier von mir gebe tue ich in eigener Verantwortung![/color]

      Kommentar

      Lädt...
      X