Link to home
Start Free TrialLog in
Avatar of sureshp
sureshp

asked on

Radio button should display the corresponding textboxes

Hi all,

 Please check my html code and add a script.
In my html page contains two radio buttons
1. Add License
2. Renew License
By default Add License value will display.

My problem is that if i choose the Renew License option
i need to display these textboxes..(instead of default display these textbox should be displayed).

Extra Licenses:    
Extra period :    
Expiry Date  :

How can i do this?
My html code is:
<html>
<head>
<title>Center.com</title>
<style type="text/css">
<!--
.texttitle {font-family: Arial, Helvetica, sans-serif; font-size: 11pt; font-weight: bold; color: #993333}
.pagetext {font-family: Arial, Helvetica, sans-serif; font-size: 9pt; color: #333333}
.boldtext {font-family: Arial, Helvetica, sans-serif; font-size: 9pt; font-weight: bold; color: #993333}
-->
</style>
</head>
<body bgcolor="#FFFFFF" background="/images/com/uu_nhome_bg.gif" link="#993333" vlink="#993333" alink="#993333">
<table width="92%" border="0" cellspacing="0" cellpadding="0" align="center" bordercolor="#CCCCCC" height="100%">
  <tr>
    <td bgcolor="#F9F9F9" height="2">
      <table width="100%" border="0" cellspacing="0" cellpadding="0" bordercolor="#CCCCCC">
        <tr bgcolor="#CCCCCC">
          <td><img src="/images/com/transparent.gif" width="1" height="10"></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr bgcolor="#DFDFDF">
    <td width="31" height="19">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="3%"><img src="/images/com/uuc_logo_new.gif" width="28" height="28" hspace="5"></td>
          <td width="97%" valign="bottom">
            <div align="right"><span class="texttitle"></span></div>
            <span class="texttitle"><i><font color="#CC0000"></font></i><font color="#CC0000"><b>Center.com</b></font></span></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr bgcolor="#F9F9F9" valign="top">
    <td>
      <table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolor="#CCCCCC" height="100%">
        <tr valign="top">
          <td height="217">
            <table width="85%" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr>
                <td>
                  <div align="left">&nbsp;</div>
                </td>
              </tr>
              <tr>
                <td><font size="3" class="texttitle">
Add/Renew License for bpa.4meweb.com
</font></td>
              </tr>
              <tr>
                <td bgcolor="#999999"><img src="/images/com/transparent.gif" width="1" height="1"></td>
              </tr>
              <tr>
                <td class="pagetext"><span class="pagetext">
                    <table width="100%" border="0" cellpadding="5">
                      <tr>
                  <td><div align="center"><font face="Arial, Helvetica, sans-serif" size=3><!--  --></font></div></td>
                </tr>
                <tr>
                 
                <td height="86">
                  <blockquote>&nbsp;
                            <div align="center">
                              <p><font face="Arial, Helvetica, sans-serif" size=2>
                               
<form name="frmRenew" method="post" action="/cgi/com/UU_purchaseToolLicense.cgi">
<input type="hidden" name="username" value="bpa">
<input type="hidden" name="domain_name" value="4meweb.com">
<input type="hidden" name="user_no" value="832725">
<input type="hidden" name="Session_ID" value="saQjky9l8B.BA0.25830652192235">
<input type="hidden" name="name" value="bpa">
<input type="hidden" name="user_type" value="M">
<input type="hidden" name="licenses" value="5">
<table border=0>
<tr><th>Tool</th><th>Licenses</th><th>Exp Date</th></tr>
<tr><td> One </td><td align="center"><font color=""> 5 </font></td><td><font color=""> 03-Mar-2001 </font></td></tr>
<tr><td> Two </td><td align="center"><font color=""> 5 </font></td><td><font color=""> 03-Mar-2001 </font></td></tr>
<tr><td> Three </td><td align="center"><font color=""> 5 </font></td><td><font color=""> 03-Mar-2001 </font></td></tr>
<tr><td> Four </td><td align="center"><font color=""> 5 </font></td><td><font color=""> 03-Mar-2001 </font></td></tr>
<tr><td> Five </td><td align="center"><font color=""> 5 </font></td><td><font color=""> 03-Mar-2001 </font></td></tr>
<tr><td> Six </td><td align="center"><font color=""> 5 </font></td><td><font color=""> 03-Mar-2001 </font></td></tr>
<tr><td> Seven </td><td align="center"><font color=""> 5 </font></td><td><font color=""> 03-Mar-2001 </font></td></tr>
<tr><td> Eight </td><td align="center"><font color=""> 5 </font></td><td><font color=""> 03-Mar-2001 </font></td></tr>
<tr><td> Nine </td><td align="center"><font color=""> 5 </font></td><td><font color=""> 03-Mar-2001 </font></td></tr>
</table>
<br><font size="2">Select any one. <br> <input type="radio" name="add" value="" checked=true>Add Licenses<br>&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="add" value="">Renew Licenses<br> <a href=/html/com/addrenewhelp.html>Click here</a> for help.</font>
<br>
 <table width="85%" border="0" cellspacing="0" cellpadding="0">
    <tr> <td>
        <div align="right"><font face="Arial, Helvetica, sans-serif" size="2">Extra Licenses: </font></div>     </td>
      <td>  <input type="text" name="license" value="" maxlength="3" size="6">
      </td>
    </tr>
  <tr>
      <td> <div align="right"><font face="Arial, Helvetica, sans-serif" size="2">Extra
          period : </font></div>      </td>
      <td>    <input type="text" name="period" value=""> </td>
 </tr>
 <tr>    <td>
        <div align="right"><font face="Arial, Helvetica, sans-serif" size="2">From
          Date : </font></div>    </td>
      <td>
        <select name="startDate">
          <option selected>1</option>
          <option>2</option>
          <option>3</option>
          <option>4</option>
          <option>5</option>
          <option>6</option>
          <option>7</option>
          <option>8</option>
          <option>9</option>
          <option>10</option>
          <option>11</option>
          <option>12</option>
          <option>13</option>
          <option>14</option>
          <option>15</option>
          <option>16</option>
          <option>17</option>
          <option>18</option>
          <option>19</option>
          <option>20</option>
          <option>21</option>
          <option>22</option>
          <option>23</option>
          <option>24</option>
          <option>25</option>
          <option>26</option>
          <option>27</option>
          <option>28</option>
          <option>29</option>
          <option>30</option>
          <option>31</option>
        </select>
<select name=monthSelect>
          <option selected >Jan</option>
          <option>Feb</option>
          <option >Mar</option>
          <option >Apr</option>
          <option >May</option>
          <option >Jun</option>
          <option >Jul</option>
          <option >Aug</option>
          <option >Sep</option>
          <option >Oct</option>
          <option >Nov</option>
          <option >Dec</option>
        </select>
<select name=yearSelect>
          <option>2000</option>
          <option selected>2001</option>
          <option>2002</option>
          <option>2003</option>
          <option>2004</option>
          <option>2005</option>
          <option>2006</option>
          <option>2007</option>
          <option>2008</option>
          <option>2009</option>
          <option>2010</option>
        </select>
      </td>
    </tr>

    <tr>
      <td>
        <div align="right"><font face="Arial, Helvetica, sans-serif" size="2">Expiry
          Date : </font></div>
      </td>
      <td>
        <input type="text" name="newexpdate" value="03-Mar-2001" readonly>
      </td>
    </tr>
 
      <tr>
      <td>
        <div align="right">
          <input type="submit" name="btnAddSpace" value=" Add/Renew" onClick="frmRenew.submit()">
        </div>
      </td>
      <td>
        <input type="button" name="btnCancel" value="  Cancel  " onClick="javascript:window.close()">
      </td>
    </tr>
  </table>
</form>
</body>
</html>

Thanks in advance

 

Avatar of nilapenn
nilapenn

<html>
<head>
<title>Center.com</title>
<style type="text/css">
<!--
.texttitle {font-family: Arial, Helvetica, sans-serif; font-size: 11pt; font-weight: bold; color: #993333}
.pagetext {font-family: Arial, Helvetica, sans-serif; font-size: 9pt; color: #333333}
.boldtext {font-family: Arial, Helvetica, sans-serif; font-size: 9pt; font-weight: bold; color: #993333}
-->
</style>
</head>
<body bgcolor="#FFFFFF" background="/images/com/uu_nhome_bg.gif" link="#993333" vlink="#993333" alink="#993333">
<table width="92%" border="0" cellspacing="0" cellpadding="0" align="center" bordercolor="#CCCCCC" height="100%">
 <tr>
   <td bgcolor="#F9F9F9" height="2">
     <table width="100%" border="0" cellspacing="0" cellpadding="0" bordercolor="#CCCCCC">
       <tr bgcolor="#CCCCCC">
         <td><img src="/images/com/transparent.gif" width="1" height="10"></td>
       </tr>
     </table>
   </td>
 </tr>
 <tr bgcolor="#DFDFDF">
   <td width="31" height="19">
     <table width="100%" border="0" cellspacing="0" cellpadding="0">
       <tr>
         <td width="3%"><img src="/images/com/uuc_logo_new.gif" width="28" height="28" hspace="5"></td>
         <td width="97%" valign="bottom">
           <div align="right"><span class="texttitle"></span></div>
           <span class="texttitle"><i><font color="#CC0000"></font></i><font color="#CC0000"><b>Center.com</b></font></span></td>
       </tr>
     </table>
   </td>
 </tr>
 <tr bgcolor="#F9F9F9" valign="top">
   <td>
     <table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolor="#CCCCCC" height="100%">
       <tr valign="top">
         <td height="217">
           <table width="85%" border="0" cellspacing="0" cellpadding="0" align="center">
             <tr>
               <td>
                 <div align="left"> </div>
               </td>
             </tr>
             <tr>
               <td><font size="3" class="texttitle">
Add/Renew License for bpa.4meweb.com
</font></td>
             </tr>
             <tr>
               <td bgcolor="#999999"><img src="/images/com/transparent.gif" width="1" height="1"></td>
             </tr>
             <tr>
               <td class="pagetext"><span class="pagetext">
                   <table width="100%" border="0" cellpadding="5">
                     <tr>
                 <td><div align="center"><font face="Arial, Helvetica, sans-serif" size=3><!--  --></font></div></td>
               </tr>
               <tr>
                 
               <td height="86">
                 <blockquote>
                           <div align="center">
                             <p><font face="Arial, Helvetica, sans-serif" size=2>
                               
<form name="frmRenew" method="post" action="/cgi/com/UU_purchaseToolLicense.cgi">
<input type="hidden" name="username" value="bpa">
<input type="hidden" name="domain_name" value="4meweb.com">
<input type="hidden" name="user_no" value="832725">
<input type="hidden" name="Session_ID" value="saQjky9l8B.BA0.25830652192235">
<input type="hidden" name="name" value="bpa">
<input type="hidden" name="user_type" value="M">
<input type="hidden" name="licenses" value="5">
<table border=0>
<tr><th>Tool</th><th>Licenses</th><th>Exp Date</th></tr>
<tr><td> One </td><td align="center"><font color=""> 5 </font></td><td><font color=""> 03-Mar-2001 </font></td></tr>
<tr><td> Two </td><td align="center"><font color=""> 5 </font></td><td><font color=""> 03-Mar-2001 </font></td></tr>
<tr><td> Three </td><td align="center"><font color=""> 5 </font></td><td><font color=""> 03-Mar-2001
</font></td></tr>
<tr><td> Four </td><td align="center"><font color=""> 5 </font></td><td><font color=""> 03-Mar-2001
</font></td></tr>
<tr><td> Five </td><td align="center"><font color=""> 5 </font></td><td><font color=""> 03-Mar-2001
</font></td></tr>
<tr><td> Six </td><td align="center"><font color=""> 5 </font></td><td><font color=""> 03-Mar-2001 </font></td></tr>
<tr><td> Seven </td><td align="center"><font color=""> 5 </font></td><td><font color=""> 03-Mar-2001
</font></td></tr>
<tr><td> Eight </td><td align="center"><font color=""> 5 </font></td><td><font color=""> 03-Mar-2001
</font></td></tr>
<tr><td> Nine </td><td align="center"><font color=""> 5 </font></td><td><font color=""> 03-Mar-2001
</font></td></tr>
</table>
<br><font size="2">Select any one. <br> <input type="radio" name="add" value="" checked=true onclick="hidrenew.style.visibility='hidden'">Add Licenses<br>    <input
type="radio" name="add" value="" onclick="hidrenew.style.visibility='visible'">Renew Licenses<br> <a href=/html/com/addrenewhelp.html>Click here</a>
for help.</font>
<br>
<div style="visibility:hidden;background-color:#0000000" id=hidrenew>
<table width="85%" border="0" cellspacing="0" cellpadding="0">
      <tr>
            <td>
                  <div align="right"><font face="Arial, Helvetica, sans-serif" size="2">Extra Licenses: </font></div>
            </td>
            <td>  
                  <input type="text" name="license" value="" maxlength="3" size="6">
            </td>
   </tr>
   <tr>
        <td> <div align="right"><font face="Arial, Helvetica, sans-serif" size="2">Extra
         period : </font></div>      </td>
        <td>    <input type="text" name="period" value=""> </td>
      </tr>
      <tr>
            <td>
                  <div align="right"><font face="Arial, Helvetica, sans-serif" size="2">From
                  Date : </font></div>    </td>
            <td>
                  <select name="startDate">
                  <option selected>1</option>
                  <option>2</option>
                  <option>3</option>
                  <option>4</option>
                  <option>5</option>
                  <option>6</option>
                  <option>7</option>
                  <option>8</option>
                  <option>9</option>
                  <option>10</option>
                  <option>11</option>
                  <option>12</option>
                  <option>13</option>
                  <option>14</option>
                  <option>15</option>
                  <option>16</option>
                  <option>17</option>
                  <option>18</option>
                  <option>19</option>
                  <option>20</option>
                  <option>21</option>
                  <option>22</option>
                  <option>23</option>
                  <option>24</option>
                  <option>25</option>
                  <option>26</option>
                  <option>27</option>
                  <option>28</option>
                  <option>29</option>
                  <option>30</option>
                  <option>31</option>
            </select>
            <select name=monthSelect>
                  <option selected >Jan</option>
                  <option>Feb</option>
                  <option >Mar</option>
                  <option >Apr</option>
                  <option >May</option>
                  <option >Jun</option>
                  <option >Jul</option>
                  <option >Aug</option>
                  <option >Sep</option>
                  <option >Oct</option>
                  <option >Nov</option>
                  <option >Dec</option>
       </select>
        <select name=yearSelect>
         <option>2000</option>
         <option selected>2001</option>
         <option>2002</option>
         <option>2003</option>
         <option>2004</option>
         <option>2005</option>
         <option>2006</option>
         <option>2007</option>
         <option>2008</option>
         <option>2009</option>
         <option>2010</option>
       </select>
     </td>
   </tr>

   <tr>
     <td>
       <div align="right"><font face="Arial, Helvetica, sans-serif" size="2">Expiry
         Date : </font></div>
     </td>
     <td>
       <input type="text" name="newexpdate" value="03-Mar-2001" readonly>
     </td>
   </tr>
 </div>
 </table>
 <table>
     <tr>
     <td>
       <div align="right">
         <input type="submit" name="btnAddSpace" value=" Add/Renew" onClick="frmRenew.submit()">
       </div>
     </td>
     <td>
       <input type="button" name="btnCancel" value="  Cancel  " onClick="javascript:window.close()">
     </td>
   </tr>
 </table>
</form>
</body>
</html>

Avatar of sureshp

ASKER

nilapenn,
Thanks for your comment.
By default (Add Licenses), need to display 3 textboxes(except from field).

Accoding to your maodified code by default it doesn't show any textboxes.

Pls try to give a solution. Thanks in advance.

selecting radio button(by default--need to show 3 text boxes).
while selecting Renew Licenses ., need to show 3 textboxes and a combobox.
Avatar of sureshp

ASKER

I am ready to add 150 Expert points.
Pls provide a solution(for ie and netscape).
Avatar of sureshp

ASKER

nilapenn,
Is there any method to do this problem?
If you a contact mail id ., pls post here.
Avatar of Michel Plungjan
If you post a 0 point question pointing at this, I am sure someone will help. Alternatively delete the question and repost it with more points
I have so little time, sorry

Michel
You can try to make the 3 text boxes read only insteda of visible/invisible.

something like

Extra Licenses: <input type=text name=textbox1 READONLY>
Extra period :  <input type=text name=textbox2 READONLY>
Expiry Date  :  <input type=text name=textbox3 READONLY>

when the radio button is changed, make them editable
<input type=radio value="r" name="rad1" onBlur="javascript:chkrad();">Add
<input type=radio value="r">Renew

<script>
function chkrad()
{
  if(document.formname.rad1.[0].checked
  {
   //Add
   document.form.textbox1.disabled=true;
   document.form.textbox2.disabled=true;
   document.form.textbox3.disabled=true;
  }
  else if(document.formname.rad1.[1].checked
  {
   //Renew
   document.form.textbox1.disabled=false;
   document.form.textbox2.disabled=false;
   document.form.textbox3.disabled=false;
  }

}
</script>

hope this helps..
hai,

Instead of radio button we use selection list and hide the

input text and enable whenever we want.

I think this will useful, try this,

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE>BSNL Administration</TITLE>
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--
function pbx_validate(pbxPair,mdfSel,mdfPair)
{
      //Checks PBX pair no empty
      if(pbxPair=="")
      {
            alert("Please enter the PBX pair number")
            document.form1.text4.focus()
      }
      //Checks PBX pair no is a number
      else if(isNaN(pbxPair))
      {
            alert("Please enter numerical PBX pair value")
            document.form1.text4.value = ""
            document.form1.text4.focus()
      }
      //call mdf_validate(mdfSel,mdfPair) with two parameter as shown
      else
      {
            mdf_validate(mdfSel,mdfPair);
      }
                  
}

function mdf_validate(mdfSel,mdfPair)
{
      //checks mdfSel Null value
      if(mdfSel=="")
      {
            alert("Please select MDF selction");
            document.form1.select4.focus()
      }
      //checks mdfPair Null value
      else if(mdfPair=="")
      {
            alert("Please enter the MDF pair number");
            document.form1.text5.value = ""
            document.form1.text5.focus()
      }
      //checks mdfPair Number Only value
      else if(isNaN(mdfPair))
      {
            alert("Please enter numerical MDF pair value")
            document.form1.text5.value = ""
            document.form1.text5.focus()
      }
      
      //checks Telephone
      else if(document.form1.select1.value =="Telephone")
      {
      // calls the phone_validate function if selection is Telephone
            phone_validate()
      }
      //checks Leased Line
      else if(document.form1.select1.value =="LeasedLine")
      {
      //calls leasedline_validate function if selection is Leases Line
            leasedline_validate()
      }
      
}

function phone_validate()
{
      //Checks the phone number empty or not
      if(document.form1.text8.value=="")
      {
            alert("Please enter Phone Number");
            document.form1.text8.focus()
      }
      //Checks the Phone numbers numberical value
      else if(isNaN(document.form1.text8.value))
      {
            alert("Please enter numerical Phone NUmber")
            document.form1.text8.value = ""
            document.form1.text8.focus()
      }
}

function leasedline_validate()
{
      //Checks the Source type Pair Number2 Whether empty or not
      if(document.form1.text6.value=="")
      {
            alert("Please enter Source Type Pair Number2");
            document.form1.text6.focus()
      }
      //Checks numerical value of Pair Number2
      else if(isNaN(document.form1.text6.value))
      {
            alert("Please enter numerical Source Type Pair Number2")
            document.form1.text6.value = ""
            document.form1.text6.focus()
      }
}

//when window first loads this function called
function window_onload()

{

   
      {
      
      
      document.form1.Label1.style.visibility="hidden"
      document.form1.text4.style.visibility="hidden"
      document.form1.Label2.style.visibility="hidden"
      document.form1.select4.style.visibility="hidden"
      document.form1.Label3.style.visibility="hidden"
      document.form1.text5.style.visibility="hidden"
      document.form1.Label4.style.visibility="hidden"
      document.form1.text6.style.visibility="hidden"
      document.form1.Label5.style.visibility="hidden"
      document.form1.text7.style.visibility="hidden"
      document.form1.Label6.style.visibility="hidden"
      document.form1.radio1.style.visibility="hidden"
      document.form1.Label7.style.visibility="hidden"
      document.form1.radio2.style.visibility="hidden"
      document.form1.Label8.style.visibility="hidden"
      document.form1.text8.style.visibility="hidden"
      
      }
      
      
}
      
function select1_onchange()
{
var cirtype = document.form1.select1.value
      
      if(cirtype == "LeasedLine")
      {      //if circuit type is leased line then two souce type pair number is necessary
            if(document.form1.select3.value!="")
            {
                  document.form1.Label5.style.visibility="visible"
                  document.form1.text7.style.visibility="visible"
            }
            
            document.form1.Label6.style.visibility="hidden"
            document.form1.radio1.style.visibility="hidden"
            document.form1.Label7.style.visibility="hidden"
            document.form1.radio2.style.visibility="hidden"
            document.form1.Label8.style.visibility="hidden"
            document.form1.text8.style.visibility="hidden"
            document.form1.Label4.style.visibility="visible"
            document.form1.text6.style.visibility="visible"
      }

      else if(cirtype == "Telephone")
      {
            document.form1.Label6.style.visibility="visible"
            document.form1.radio1.style.visibility="visible"
            document.form1.Label7.style.visibility="visible"
            document.form1.radio2.style.visibility="visible"
            document.form1.Label8.style.visibility="visible"
            document.form1.text8.style.visibility="visible"
            document.form1.Label4.style.visibility="hidden"
            document.form1.text6.style.visibility="hidden"
            document.form1.Label5.style.visibility="hidden"
            document.form1.text7.style.visibility="hidden"
      }
                              
      else
      {
            document.form1.Label6.style.visibility="hidden"
            document.form1.radio1.style.visibility="hidden"
            document.form1.Label7.style.visibility="hidden"
            document.form1.radio2.style.visibility="hidden"
            document.form1.Label8.style.visibility="hidden"
            document.form1.text8.style.visibility="hidden"
            document.form1.Label4.style.visibility="hidden"
            document.form1.text6.style.visibility="hidden"
            document.form1.Label5.style.visibility="hidden"
            document.form1.text7.style.visibility="hidden"
      }
}


      //This whole function is to hide and make visible the mdf and pbx selection
function select3_onchange()
{
var port = document.form1.select3.value

if(port == "MDF")
      {
      if(document.form1.select1.value=="LeasedLine")
            {
            document.form1.Label5.style.visibility="visible"
            document.form1.text7.style.visibility="visible"
            }
      if( document.form1.teleSource[1].checked)
            {
            document.form1.Label5.style.visibility="visible"
            document.form1.text7.style.visibility="visible"
            }
      document.form1.Label1.style.visibility="hidden"
      document.form1.text4.style.visibility="hidden"
      document.form1.Label2.style.visibility="visible"
      document.form1.select4.style.visibility="visible"
      document.form1.Label3.style.visibility="visible"
      document.form1.text5.style.visibility="visible"
      
      }
      else if(port == "PBX")
      {
            if(document.form1.select1.value=="LeasedLine")
            {
                  document.form1.Label5.style.visibility="visible"
                  document.form1.text7.style.visibility="visible"
            }
            if( document.form1.teleSource[1].checked)
            {
                  document.form1.Label5.style.visibility="visible"
                  document.form1.text7.style.visibility="visible"
            }
            document.form1.Label1.style.visibility="visible"
            document.form1.text4.style.visibility="visible"      
            document.form1.Label2.style.visibility="visible"
            document.form1.select4.style.visibility="visible"
            document.form1.Label3.style.visibility="visible"
            document.form1.text5.style.visibility="visible"
      
      }
else if(port=="")
      {
      document.form1.Label1.style.visibility="hidden"
      document.form1.text4.style.visibility="hidden"
      document.form1.Label2.style.visibility="hidden"
      document.form1.select4.style.visibility="hidden"
      document.form1.Label3.style.visibility="hidden"
      document.form1.text5.style.visibility="hidden"
      document.form1.Label5.style.visibility="hidden"
      document.form1.text7.style.visibility="hidden"
      }      
}

function button1_onfocus()      
{

if(document.form1.select1.value=="")
      {
            alert("Please select the Circuit Type");
            document.form1.select1.focus()
      }
else if(document.form1.text1.value=="")      
      {
            alert("Please enter the link name");
            document.form1.text1.focus()
      }
else if(document.form1.text2.value=="")      
      {
            alert("Please enter the description");
            document.form1.text2.focus()
      }            
else if(document.form1.select2.value=="")      
      {
            alert("Please select the source type");
            document.form1.select2.focus()
      }
else if(document.form1.text3.value=="")      
      {
            alert("Please enter the source type pair number");
            document.form1.text3.focus()
      }
else if(isNaN(document.form1.text3.value))
{
      alert("please enter Numerical Source Type pair value")
      document.form1.text3.value=""
      document.form1.text3.focus()
}
else if(document.form1.select3.value=="")
      {
      alert("Please select the port.")
      document.form1.select3.focus()
      }
      //this is check PBX if it is then, call pbx_validate(a,b) function
else if(document.form1.select3.value=="PBX")
      {
      pbx_validate(document.form1.text4.value,document.form1.select4.value,document.form1.text5.value);
      }
      //this is check PBX if it is then, call mdf_validate(a,b) function
else if(document.form1.select3.value=="MDF")
      {
      mdf_validate(document.form1.select4.value,document.form1.text5.value);
      }
}      


//This function will called when selection is Leased Line
function radio2_onclick()
{

      document.form1.Label4.style.visibility="visible"
      document.form1.text6.style.visibility="visible"

}
//This function will called when selection is Telephone
function radio1_onclick()
{
      document.form1.Label4.style.visibility="hidden"
      document.form1.text6.style.visibility="hidden"
      document.form1.Label5.style.visibility="hidden"
      document.form1.text7.style.visibility="hidden"
      

}

//-->
</SCRIPT>
</HEAD>
<BODY bgColor=white LANGUAGE=javascript onload="return window_onload()" background="file://\\Ws0042\c\juzzfone\bg3.jpg" aLink =darksalmon vLink=darkred link=brown>
<FORM action="http:\\ws0042\new\indexupdate.asp" method=post id=form1 name=txtForm>
<P align=center><STRONG
style="COLOR: darkblue; FONT-FAMILY: serif;  FONT-SIZE: x-large" title="DoT Adminstration">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;BSNL Administration</STRONG></P>
<P>
<HR style="LEFT: 10px; TOP: 64px" id=HR1 color=brown>

<P></P>
<P>&nbsp;</P>

<TABLE align=center border=0 cellPadding=2 cellSpacing=1
style="HEIGHT: 420px; LEFT: 45px; TOP: 146px; WIDTH: 571px" width="75%" height="120%">
  <TBODY align=left>
 
  <TR>
    <TD align=left><STRONG>Circuit Type</STRONG></TD>
    <TD><SELECT id=select1  name=cirType
      style="HEIGHT: 21px; WIDTH: 110px" LANGUAGE=javascript onchange="return select1_onchange()">
        <OPTION value="" selected
       >Select one</OPTION> <OPTION
        value=Telephone>Telephone</OPTION><OPTION value ="LeasedLine"
       >Leased
        Line</OPTION></SELECT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
         <INPUT name=teleSource type=radio value=Telephone  id=radio1 checked LANGUAGE=javascript onclick="return radio1_onclick()">
         <INPUT id=Label6 name=label6 readOnly size=15   style="BACKGROUND-COLOR: #f5f5dc; BACKGROUND-IMAGE: url(file://\\Ws0042\c\juzzfone\bg3.jpg); BORDER-BOTTOM-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-TOP-STYLE: none; FLOAT: none; FONT-FAMILY: Times New Roman; FONT-SIZE: small; FONT-VARIANT: normal; FONT-WEIGHT: bold; HEIGHT: 22px; WIDTH: 72px" tabIndex
      =12 value=Telephone><STRONG>&nbsp;&nbsp;&nbsp;
      <INPUT  name=teleSource type=radio value=ISDN id=radio2 LANGUAGE=javascript onclick="return radio2_onclick()">
      <INPUT  id=Label7 name=label7 readOnly size=15
      style="BACKGROUND-COLOR: #f5f5dc; BACKGROUND-IMAGE: url(file://\\Ws0042\c\juzzfone\bg3.jpg); BORDER-BOTTOM-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-TOP-STYLE: none; FLOAT: none; FONT-FAMILY: Times New Roman; FONT-SIZE: small; FONT-VARIANT: normal; FONT-WEIGHT: bold; HEIGHT: 22px; WIDTH: 72px" tabIndex
      =12 value=ISDN></STRONG></TD></TR>
  <TR>
    <TD align=left><STRONG >Name of
      Link</STRONG></TD>
    <TD><INPUT id=text1 name=nameLink
style="HEIGHT: 24px; WIDTH: 155px" tabIndex=1>&nbsp;
      <INPUT id=Label8 name=label8 readOnly size=15
      style="BACKGROUND-COLOR: #f5f5dc; BACKGROUND-IMAGE: url(file://\\Ws0042\c\juzzfone\bg3.jpg); BORDER-BOTTOM-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-TOP-STYLE: none; FLOAT: none; FONT-FAMILY: Times New Roman; FONT-SIZE: small; FONT-VARIANT: normal; FONT-WEIGHT: bold; HEIGHT: 22px; WIDTH: 98px" tabIndex
      =12 value=PhoneNumber>&nbsp;&nbsp;<STRONG><INPUT id=text8 name=phoneNo
      style="HEIGHT: 23px; WIDTH: 99px" maxLength=15></STRONG></TD></TR>
  <TR>
    <TD align=left><STRONG>Description&nbsp;</STRONG></TD>
    <TD><TEXTAREA id=text2 name=linkDesc style="HEIGHT: 74px; WIDTH: 233px" tabIndex=2></TEXTAREA></TD></TR>
  <TR>
    <TD align=left><STRONG>Source Type</STRONG></TD>
    <TD><SELECT id=select2 name=sourceType style="HEIGHT: 27px; WIDTH: 110px" tabIndex=3>
        <OPTION  
        selected value="">Select One</OPTION><OPTION value=DoT>DoT</OPTION><OPTION  
      value=STM>STM</OPTION></SELECT></TD></TR>
  <TR>
    <TD align=left><STRONG>Source Type Pair
      Number&nbsp;&nbsp;</STRONG></TD>
    <TD><INPUT id=text3 name=stpairNumber1
  style="HEIGHT: 23px; WIDTH: 45px" alt="" maxLength=3
      tabIndex=4
     >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      &nbsp;&nbsp;&nbsp;<INPUT
      id=Label4 name=label4 readOnly size=15
      style="BACKGROUND-COLOR: #f5f5dc; BACKGROUND-IMAGE: url(file://\\Ws0042\c\juzzfone\bg3.jpg); BORDER-BOTTOM-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-TOP-STYLE: none; FLOAT: none; FONT-FAMILY: Times New Roman; FONT-SIZE: small; FONT-VARIANT: normal; FONT-WEIGHT: bold; HEIGHT: 26px;
      WIDTH: 120px" value
      ="Pair Number2"
      tabIndex=12>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      &nbsp;&nbsp;&nbsp;<INPUT alt="" id=text6 maxLength=3
      name=stpairNumber2 style="HEIGHT: 23px; WIDTH: 45px"
      tabIndex=5></TD></TR>
  <TR>
    <TD align=left><STRONG>Port</STRONG></TD>
    <TD><SELECT id=select3 name=portChoice style="HEIGHT: 23px; WIDTH: 110px" LANGUAGE=javascript onchange="return select3_onchange()"
      tabIndex=6>
        <OPTION selected value="">Select One</OPTION><OPTION
        value=MDF>MDF</OPTION><OPTION value=PBX>PBX</OPTION></SELECT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <INPUT
      id=Label1 name=label1 readOnly size=15
      style="BACKGROUND-COLOR: #f5f5dc; BACKGROUND-IMAGE: url(file://\\Ws0042\c\juzzfone\bg3.jpg); BORDER-BOTTOM-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-TOP-STYLE: none; FLOAT: none; FONT-FAMILY: Times New Roman; FONT-SIZE: small; FONT-VARIANT: normal; FONT-WEIGHT: bold; HEIGHT: 25px;
      WIDTH: 146px" value
      ="PBX Pair Number" tabIndex=13>&nbsp;
      &nbsp;<INPUT id=text4 maxLength=3 name=pbxPairno
      style="HEIGHT: 22px; WIDTH: 45px" tabIndex=7
     ></TD></TR>
  <TR>
    <TD align=left style="FONT-STYLE: oblique"><INPUT
      id=Label2 name=label2 readOnly size=15
      style="BACKGROUND-COLOR: #f5f5dc; BACKGROUND-IMAGE: url(file://\\Ws0042\c\juzzfone\bg3.jpg); BORDER-BOTTOM-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-TOP-STYLE: none; FLOAT: none; FONT-FAMILY: Times New Roman; FONT-SIZE: small; FONT-VARIANT: normal; FONT-WEIGHT: bold; HEIGHT: 25px; WIDTH: 146px" value
      ="MDF Selection" tabIndex=14></TD>
    <TD><SELECT id=select4 name=mdfChoice
      style="HEIGHT: 23px; VISIBILITY: visible; WIDTH: 110px" tabIndex=8
     > <OPTION
        selected value="">Select One</OPTION><OPTION
        value=Basement>Basement</OPTION><OPTION value=GroundFloor>Ground
   
    Floor</OPTION><OPTION value=DataCenter>DataCenter</OPTION><OPTION
        value=FirstFloor>First Floor</OPTION><OPTION value=SecondFloor>Second
        Floor</OPTION><OPTION value=ThirdFloor>Third Floor</OPTION></SELECT></TD></TR>
  <TR>
    <TD align=left vAlign=top><INPUT id=Label3 name=label3 readOnly
      size=15
      style="BACKGROUND-COLOR: #f5f5dc; BACKGROUND-IMAGE: url(file://\\Ws0042\c\juzzfone\bg3.jpg); BORDER-BOTTOM-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-TOP-STYLE: none; FLOAT: none; FONT-FAMILY: Times New Roman; FONT-SIZE: small; FONT-VARIANT: normal; FONT-WEIGHT: bold; HEIGHT: 25px;
      WIDTH: 146px" value
      ="MDF Pair Number" tabIndex=15></TD>
    <TD style="VERTICAL-ALIGN: top">
      <P><INPUT id=text5
      name=mdfPairno1 style="HEIGHT: 25px; LEFT: 1px; TOP: 41px;
      VISIBILITY: visible; WIDTH: 45px"
      alt="" maxLength=3 tabIndex=9>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
      &nbsp;<INPUT
      id=Label5 name=label4 readOnly size=15
      style="BACKGROUND-COLOR: #f5f5dc; BACKGROUND-IMAGE: url(file://\\Ws0042\c\juzzfone\bg3.jpg); BORDER-BOTTOM-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-TOP-STYLE: none; FLOAT: none; FONT-FAMILY: Times New Roman; FONT-SIZE: small; FONT-VARIANT: normal; FONT-WEIGHT: bold; HEIGHT: 26px;
      WIDTH: 120px" tabIndex
      =12 value="Pair Number2"
     >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <INPUT
      alt="" id=text7 maxLength=3 name=mdfpairno2
      style="HEIGHT: 23px; WIDTH: 45px"
tabIndex=5></P></TD></TR></TBODY></TABLE>
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<INPUT id=button1 name=formSubmit style="HEIGHT: 38px; LEFT: 10px; TOP: 525px; WIDTH: 72px" type=submit value=Enter LANGUAGE=javascript onfocus="return button1_onfocus()" tabIndex=10>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<INPUT id=reset1 name=reset1 style="HEIGHT: 38px; WIDTH: 72px" type=reset value=Reset tabIndex=11>
<br>
<br>
<H4>
<a href="http://ws0042/new/list_telephonelines.asp"><STRONG>View&nbsp;Telephone&nbsp;Line
</a>
<br><br>
<A href="http://ws0042/new/list_leasedlines.asp">View&nbsp;Leased&nbsp;Line</A></STRONG></H4>
<H4><STRONG>&nbsp;</H4>

</FORM></STRONG>

</BODY>
</HTML>

with cheers.
You can't do a show/hide on form elements in Netscape (at least you can't in 4+ versions, not sure about 6). They'll always show through. You can hide the ENTIRE form -- but then it's not scriptable, since when it's hidden, it's REALLY hidden.

Also, they'll be on a DIFFERENT form, so you'd need to carry any necessary fields to that form.

You also can't dynamically move the elements -- so they'll have to be set under the existing ones, and they won't move anything out of the way, and will either leave a hole on the page or have to be scrolled to see them.

So this isn't going to work in Netscape 4+, no matter what you do to it. If you need Netscape support, rethink it completely.

Why not just have it go to another whole page? Much easier, much more intuitive for the user, and works for everything -- even old/strange browsers.
However you can show the fields as a new form and gather all the fom bits to the hidden form that is the one that has the submit button. A LOT of things can be scripted. A LOT more than WebWoman wants- so don't pay any attention to "no matter what you do" I wish WW would be a little more positive :(
And BTW - Netscape 6 IS a lot more scriptable so you should get rid of the + from NS4+

Michel

You have pended this question for deletion, however, the deletion did not complete.

Comment here please as to why you want to delete this rather than award points.  You asked for help in February of this year, much help followed and now you process a deletion request without any words to the experts who stepped in to help you.

Listening further.

Moondancer
Community Support Moderator @ Experts Exchange
Please return and update/finalize all your open questions.  If you need our help, let us know.  If the questions remain unresolved next week, we will need to take the actions to close them.

Your cooperation in managing your questions at this site is not only appreciated but necessary.

Topic Area              URL              Date              
Community Support (General)   https://www.experts-exchange.com/jsp/qShow.jsp?ta=commspt&qid=20252119  01/06/02  
JavaScript   https://www.experts-exchange.com/jsp/qShow.jsp?ta=javascript&qid=20069836  02/02/01  
JavaScript   https://www.experts-exchange.com/jsp/qShow.jsp?ta=javascript&qid=20076966  02/13/01  
JavaScript   https://www.experts-exchange.com/jsp/qShow.jsp?ta=javascript&qid=20227582  11/06/01  
Perl   https://www.experts-exchange.com/jsp/qShow.jsp?ta=perl&qid=11326038  09/20/00  
Perl   https://www.experts-exchange.com/jsp/qShow.jsp?ta=perl&qid=20182722  09/13/01  
Perl   https://www.experts-exchange.com/jsp/qShow.jsp?ta=perl&qid=20182782  09/14/01  
Perl   https://www.experts-exchange.com/jsp/qShow.jsp?ta=perl&qid=20247168  12/18/01  
Perl   https://www.experts-exchange.com/jsp/qShow.jsp?ta=perl&qid=20247820  12/19/01  
Perl   https://www.experts-exchange.com/jsp/qShow.jsp?ta=perl&qid=20253473  01/10/02  

Moondancer
Community Support Moderator @ Experts Exchange
ASKER CERTIFIED SOLUTION
Avatar of Moondancer
Moondancer

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial