cesark
09-28-2004, 05:32 PM
Hi,
How can I achieve that the third and fourth column are very closer to the second column? I mean, the ‘Product’, ‘Specify Product’ and ‘Special Name’ labels (with its fields) appear beside of the other fields (Family Product, Type,..)
You will see that when you choose the family ‘3’ from the first select, another row appears. I want to maintain the appearance described above after that row appears.
Here is the complete code sample:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script language="JavaScript">
function other_Fam() {
var family = document.test_form.familyProd.value;
if (family != 2) {
document.getElementById("othersFP").style.display = "none";
document.getElementById("prodTitle").style.visibility = "visible";
document.getElementById("product").style.visibility = "visible";
}
else {
document.getElementById("othersFP").style.display = "inline";
document.getElementById("otherF").style.visibility = "visible";
document.getElementById("specFamily").style.visibility = "visible";
document.getElementById("prodTitle").style.visibility = "hidden";
document.getElementById("product").style.visibility = "hidden";
}
}
</script>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body onLoad="other_Fam();">
<form name="test_form">
<table width="100%" border="0" cellspacing="0" bgcolor="#FFFFCC" id="dades_bas">
<tr>
<td width="118" height="30" align="left" valign="middle" class="lletra4"><span class="astVerm">*</span> Family
Product:</td>
<td align="left" valign="middle">
<select name="familyProd" onchange="return other_Fam();">
<option value="0">Family 1</option>
<option value="1">Family 2</option>
<option value="2">Family 3</option>
</select>
</td>
<td align="left" valign="middle" width="118"><span id="prodTitle">* Product: </span></td>
<td align="left" valign="middle"><select name="product">
<option value="0">Product 1</option>
<option value="1">Product 2</option>
<option value="2">Product 3</option>
<option value="3">Product 4</option>
</select>
</td>
</tr>
<tr id="othersFP">
<td height="30" align="left" valign="middle"><span id="otherF">* Specify Family: </span></td>
<td align="left" valign="middle"><input type="text" name="specFamily"></td>
<td align="left" valign="middle">* Specify Product: </td>
<td align="left" valign="middle"><input type="text" name="other_prod"></td>
</tr>
<tr>
<td height="30" align="left" valign="middle"> Type: </td>
<td height="30" align="left" valign="middle"><input type="text" name="var"></td>
<td height="30" align="left" valign="middle"> Special Name </td>
<td height="30" align="left" valign="middle"><input type="text" name="special"></td>
</tr>
<tr>
<td height="30" align="left" valign="middle">* Offer Title: </td>
<td height="30" colspan="3" align="left" valign="middle"><input type="text" name="title"></td>
</tr>
</table>
</form>
</body>
</html>
Thanks
How can I achieve that the third and fourth column are very closer to the second column? I mean, the ‘Product’, ‘Specify Product’ and ‘Special Name’ labels (with its fields) appear beside of the other fields (Family Product, Type,..)
You will see that when you choose the family ‘3’ from the first select, another row appears. I want to maintain the appearance described above after that row appears.
Here is the complete code sample:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<script language="JavaScript">
function other_Fam() {
var family = document.test_form.familyProd.value;
if (family != 2) {
document.getElementById("othersFP").style.display = "none";
document.getElementById("prodTitle").style.visibility = "visible";
document.getElementById("product").style.visibility = "visible";
}
else {
document.getElementById("othersFP").style.display = "inline";
document.getElementById("otherF").style.visibility = "visible";
document.getElementById("specFamily").style.visibility = "visible";
document.getElementById("prodTitle").style.visibility = "hidden";
document.getElementById("product").style.visibility = "hidden";
}
}
</script>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body onLoad="other_Fam();">
<form name="test_form">
<table width="100%" border="0" cellspacing="0" bgcolor="#FFFFCC" id="dades_bas">
<tr>
<td width="118" height="30" align="left" valign="middle" class="lletra4"><span class="astVerm">*</span> Family
Product:</td>
<td align="left" valign="middle">
<select name="familyProd" onchange="return other_Fam();">
<option value="0">Family 1</option>
<option value="1">Family 2</option>
<option value="2">Family 3</option>
</select>
</td>
<td align="left" valign="middle" width="118"><span id="prodTitle">* Product: </span></td>
<td align="left" valign="middle"><select name="product">
<option value="0">Product 1</option>
<option value="1">Product 2</option>
<option value="2">Product 3</option>
<option value="3">Product 4</option>
</select>
</td>
</tr>
<tr id="othersFP">
<td height="30" align="left" valign="middle"><span id="otherF">* Specify Family: </span></td>
<td align="left" valign="middle"><input type="text" name="specFamily"></td>
<td align="left" valign="middle">* Specify Product: </td>
<td align="left" valign="middle"><input type="text" name="other_prod"></td>
</tr>
<tr>
<td height="30" align="left" valign="middle"> Type: </td>
<td height="30" align="left" valign="middle"><input type="text" name="var"></td>
<td height="30" align="left" valign="middle"> Special Name </td>
<td height="30" align="left" valign="middle"><input type="text" name="special"></td>
</tr>
<tr>
<td height="30" align="left" valign="middle">* Offer Title: </td>
<td height="30" colspan="3" align="left" valign="middle"><input type="text" name="title"></td>
</tr>
</table>
</form>
</body>
</html>
Thanks