Re: hi

From: Date: Sat, 01 Sep 2001 07:26:04 +0000
Subject: Re: hi
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-65596@lists.php.net to get a copy of this message
It sounds like you want to set the select box to something wider than the product names so that it always comes out the same width. There is likely some elegant way to do this, but a quick fix would be to fill one of the <option> cells with a line of unprintable characters;. You could make it the first <option> cell, the one usually blank, or put it last behind your products. The code would look something like: print "<option> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ..."; // use as many &nbsp;'s as needed. Hope this helps. Hugh ----- Original Message ----- From: Balaji Ankem <balaji.ankem@wipro.com> To: Renze Munnik <renze@datalink.nl> Cc: <php-general@lists.php.net> Sent: Friday, August 31, 2001 11:40 AM Subject: [PHP] hi > Hi, Renze, > > > I have one doubt in HTML. I should not ask this in this group. I don't have > any alternative. Please consider this. > > How to increase the length of the select box. It is comming width as very > less. > I would like to increase that width. > > see the following code.. > > <BODY background="imacbg1.gif" > ONLOAD="document.issue.inv_name.focus()"> > > <form name="issue"> > <div align="center"> > <center> > <h2>ISSUE</h2> > <input type="hidden" name="issued_by" value="<?php echo > $emp_name; ?>"/> > <h2>Issuing by <?php echo $emp_name; ?> </h2> > <table border="0" width="100%"> > <tr> > <th width="50%" align="right"> > > <p align="right"><b><font size="2" > face="Arial">Equipment > Name&nbsp;</font></b></th> > <td width="5%"></td> > > <td width="50%" align="left"> > <select name="inv_name"> > <script language="php"> > $query = "SELECT distinct inv_name FROM inventory ORDER BY > inv_name "; > $result = mysql_query($query); > if(mysql_num_rows($result)) > { > // we have at least one equipment, so show all equipments as > options in select form > > print("<option value=\"\">select</option>"); > while($row = mysql_fetch_row($result)) > { > print("<option > value=\"$row[0]\">$row[0]</option>"); > } > } > else > { > print("<option value=\"\">No equipment added > yet</option>"); > } > </script> > </select> > </td> > </tr> > <tr> > <th width="50%" align="right"> > > <p align="right"><b><font size="2" > face="Arial">Equipment > Type&nbsp;</font></b></th> > <td width="5%"></td> > > <td width="50%"> > <select name="inv_type" > > <script language="php"> > $query = "SELECT distinct inv_type FROM inventory ORDER BY > inv_type"; > $result = mysql_query($query); > if(mysql_num_rows($result)) > { > // we have at least one equipment, so show all equipments as > options in select form > print("<option value=\"\">select</option>"); > while($row = mysql_fetch_row($result)) > { > print("<option > value=\"$row[0]\">$row[0]</option>"); > } > } > else > { > print("<option value=\"\">No equipment added > yet</option>"); > > } > file://closing the mysql connection > mysql_close($connection); > // Get current time and date > $today = date("Y:m:d H:i:s"); > </script> > </select> > </td> > </tr> > <tr><td width="50%" align="right"><b><font > size="2" face="Arial">Equipment > Tag&nbsp;</font></b></td><td width="5%"></td><td > width="40%" ><input > type="text" name="inv_tag" size="20" > value=""></td></tr> > <tr><td width="50%" align="right"><b><font > size="2" face="Arial">Issued > To&nbsp;</font></b></td><td width="5%"></td><td > width="40%"> <input > type="text" name="issued_to" size="20" > value=""></td></tr> > <tr><td width="50%" align="right"><b><font > size="2" face="Arial">Issue > Date&nbsp;</font></b></td><td > width="5%"></td><td width="40%"> <input > type="text" name="issue_date" size="20" value="<?php echo > $today;?>"></td></tr> > <tr> > <td width="50%" align="right"> > <p align="left"> > </td> > <td width="5%"> > </td> > <td width="50%"> > <p align="left"> <input type="button" Value="SUBMIT" > OnClick="check();"></td> > </tr> > </table> > </center> > </div> > </form> > </BODY> > > > Thanks and regards > -Balaji > > > ---------------------------------------------------------------------------- ---- > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#65596) next »