Buenas a todos
 
Soy nuevo por estos temas, antes solo me encargaba de temas html y css en mi trabajo, pero ahora me han pedido que agregue un radio button en la web, no soy programador y llevo unos días leyendo todo lo que puedo sobre javascript pero no veo por que no funciona este script, a ver si me podéis echar una mano.
 
No lo pediría sino tuviera prisa en el trabajo, muchas gracias por vuestra ayuda y a ver si me podéis ayudar.
 
<div id="login_ldap">
    <fieldset>
        <legend>Login UEM</legend>
        <label for="extpatid">Expedient number/Worker</label>
        <div class="loginFieldBg">
          <input id="extpatid" name="extpatid" type="text" value="" size="20" maxlength="40" tabindex="5" class="loginField">
        </div>
        <label for="extpatpw">Password</label>
        <div class="loginFieldBg">
          <input id="extpatpw" name="extpatpw" type="password" value="" size="20" maxlength="40" tabindex="10" class="loginField">
                               </div>
                               <label for="extpldap">LDAP</label>
                               <div class="loginFieldBg">
             <input type="radio" name="extpldap" id="r1" value="0">Students
                                               <input type="radio" name="extpldap" id="r2" value="1"checked >Workers
                               </div>
 
        <!-- This button is a duplicate submit for convenience on mobile devices. -->
        <input name="extpatsubmit" type="button" value="Submit" tabindex="12" class="loginSubmit" onclick="document.forms['fm1'].submit();">
                               </fieldset>
    </div>
<!-- end loginldap -->
 
 
                <!--display login form-->
                <div id="login">
<fieldset>
  <legend>Library Account Login</legend>
  <label for="code2">Expedient number/Worker</label>
  <div class="loginFieldBg">
    <input id="code2" name="code" type="text" value="" size="20" maxlength="40" tabindex="20" class="loginField">
  </div>
  <div id="ipssopinentry">
    <label for="pin">PIN</label>
    <div class="loginFieldBg">
      <input id="pin" name="pin" type="password" value="" size="20" maxlength="40" tabindex="30" class="loginField">
    </div>
  </div>
  <!--theForm3-->
  <!-- This button is hidden unless using mobile devices. Even if hidden it enables Enter key to submit. -->
  <input type="submit" name="Log In2" class="loginSubmit">
  <legend></legend>
</fieldset>
</div>
<!-- end login -->
 
 
 
<!--ifneedspin-->
                                               <fieldset class="newpin" id="ipssonewpin">
            <legend>Please enter a new PIN</legend>
                <label for="pin1">New PIN</label>
                <div class="loginFieldBg">
                  <input id="pin1" name="pin1" type="password" value="" size="20" maxlength="40" tabindex="35" class="loginField">
                            </div>
 
                <label for="pin2">Retype new PIN</label>
                <div class="loginFieldBg">
                  <input id="pin2" name="pin2" type="password" value="" size="20" maxlength="40" tabindex="40" class="loginField">
                </div>
 
       </fieldset>
<!--xif-->
        <!-- This button is hidden unless using mobile devices. Even if hidden it enables Enter key to submit. -->
        <input type="submit" name="Log In" class="loginSubmit">
 
                  </fieldset>
                </div>  <!-- end login -->
    <div class="clearfloats"></div>
    <div class="formButtons">
                <a href="#" onclick="document.forms['fm1'].submit();"><div onmousedown="this.className='pressedState';" onmouseout="this.className='';" onmouseup="this.className='';"><div class="buttonSpriteDiv"><span class="buttonSpriteSpan1"><span class="buttonSpriteSpan2">Submit</span></span></div></div></a>
                </div>
</form>
 
<!--Enable form focus-->
<script type="text/javascript"><!--//--><![CDATA[//><!--
//Hide the main PIN entry if the new pin section is active.
try { if ( document.getElementById("ipssonewpin") ) {
                document.getElementById("ipssopinentry").style.dis  play="none"; } }
catch(err) {}
 
//Look for the first field in the external patron part of the form. This field will get cursor focus.
var ipssoFirstField;
try { ipssoFirstField = document.forms[0].extpatid; }
catch(err) {
}
//If we still don't have a field, look for the name field in the library account part.
if ( ipssoFirstField==undefined ) { ipssoFirstField = document.forms[0].name; }
//Set focus. Ignore errors.
try { ipssoFirstField.focus(); }
catch(err) {}
 
document.onkeydown = enterSubmit
 
function enterSubmit(e) {
var keycode;
if (window.event) keycode = window.event.keyCode;
else if (e) keycode = e.which;
if (keycode==13)
document.forms[0].submit();
}
 
//--><!]]></script>
 
Lo que no consigo es que el formulario envie la información del Radio button.
 
Y ya de paso si me podéis recomendar algún libro o tutorial para no programadores para empezar desde cero.
 
Muchas gracias por vuestra ayuda y siento que el primer tema sea así.
 
Un saludo 
  
 


