Board index   FAQ   Search  
Register  Login
Board index php forum :: HTML JavaScript

Javascript event problem

Javascript coding ..

Moderators: macek, egami, gesf

Javascript event problem

Postby jacque99 » Fri Nov 04, 2011 5:08 am

Hello everyone,
If I type the name, and I check and Gender Scholar, my button will

What I am looking to:
Check my buttons, and when I start typing the name, the button

Submit appear, st if I delete the text, the Submit button


Here's the script:


Voici le script :

Code: Select all
  <script type="text/javascript" src="jquery.validate.js"></script>
  function check_required(){
   //alert(document.getElementById('txt_lastname').value != "");
   if((document.getElementById('rdo_boursier_oui').checked == true

|| document.getElementById('rdo_boursier_non').checked == true) &&

(document.getElementById('rdo_sexe_eleve_m').checked == true ||

document.getElementById('rdo_sexe_eleve_f').checked == true)
&&   (document.getElementById('txt_lastname').value != "" )



  <form action="#" method="post" id="commentForm">
      <input class="submit" type="submit" name="submit_etape2"

id="submit_etape2" value="" style="display:none;"/>
         <p class="p_float">
            <label for="lastname">Votre nom<span

            <input type="text" name="txt_lastname"

id="txt_lastname" value="" class="required" minlength="3"
         <p class="p_float rdo">
            <label for="boursier">Boursier<span

            <input type="radio" name="rdo_boursier"

id="rdo_boursier_oui" value="" class="rdo_sexe_eleve snd_inscription

required" onclick="check_required();"/>Oui
            <input type="radio" name="rdo_boursier"

id="rdo_boursier_non" value="" class="rdo_sexe_eleve snd_inscription

required" onclick="check_required();"/>Non
         <p class="p_float rdo">
            <label for="sexe">Sexe<span

            <input type="radio"

name="rdo_sexe_eleve" id="rdo_sexe_eleve_m" class="rdo_sexe_eleve

snd_inscription required" onclick="check_required();" value="">M
            <input type="radio"

name="rdo_sexe_eleve" id="rdo_sexe_eleve_f" class="rdo_sexe_eleve

snd_inscription required" onclick="check_required();" value="">F
New php-forum User
New php-forum User
Posts: 12
Joined: Tue Sep 07, 2010 6:06 am

Return to JavaScript

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.