Hi! friend,
   I had one html form .
   In that i had 5 inputs.
   First option is a select box.
   If the selected item is Mobile then only i want to display  second and
third input boxes. Otherwise i want to hide those two options.

How can i endure that?

Please give the solution to this problem.

Thanks and regards

Here i am sending the file..


<!DOCTYPE html public "-//w3c//dtd html 4.0 transitional//en">

<script language="Javascript">

function check(){

   alert('Please select the item name');
   return false;
      else if(document.addinv.inv_type.options[0].selected)
   alert('Please select the item type');
   return false;

      else if (document.addinv.inv_tag.value=='' ||
                 alert('Inventory tag is required and it must start with
alphabet.Please try again');
                 return false;


      {         document.addinv.method = "POST";
             return true;


<body background="imacbg1.gif" ONLOAD="document.addinv.inv_name.focus()" >

   <center> <h1> ADD INVENTORY ITEM </h1></center>
     <! Get current time and date >
           <?php    $today = date("Y:m:d h:i:s"); ?>

          <h3> TIME STAMP: <?php echo $today; ?> </h3>
 <form name="addinv" >

 Item Name :
     <select name="inv_name" STYLE="width : 120px">

    <option value="0" SELECTED>SELECT</option>
      <option value="Mobile">Mobile</option>
      <option value="SIM">SIM</option>
      <option value="Data Cable">Data Cable</option>
      <option value="Charger">Charger</option>
      <option value="Power Supply">Power Supply</option>


Item Type:
      <select name="inv_type" STYLE="width : 120px" >

        <option value="0" SELECTED>SELECT</option>
       <option value="PTX520">PTX520</option>
       <option value="PTX438">PTX438</option>
       <option value="J5">J5</option>
       <option value="J6">J6</option>
       <option value="Z5">Z5</option>


 IMEI Number<input type="text" name="inv_imei" size="15" value="">

 Item Tag   <input type="text" name="inv_tag" size="15" value="">

 Status     <select name="inv_status" STYLE="width : 120px">
        <option value="0" SELECTED>SELECT</option>
        <option value="stock">STOCK</option>
        <option value="inuse">IN USE</option>

  <input type="button" Value="ADD" OnClick="check();"></td>


If  Item name is Mobile then only we can enter type and IMEI...otherwise i
want to hide and i will insert blank values in to the database.

Thanks in advance.


Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers
and is intended for use only by the individual or entity to which it is
addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended
recipient or it appears that this mail has been forwarded to you without
proper authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail
from your records.

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to