Hi guys,
I am trying to hide 2 list boxes, then on selection changed show a new list box with JavaScript, i am very very new to web development in general, I am actually a software developer in the Pascal and C# language so this is all very new to me, please help with any ideas or code ?
This is what i have
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%">
<tr>
<td align="center" valign="middle" style="background: url('Image2.jpg') no-repeat fixed 50% top; height: 113px; color: #FFFFFF; font-family: Arial, Helvetica, sans-serif; font-style: normal; font-variant: normal; font-weight: bold; line-height: normal;" valign="top" class="style1">
NCS Quote System</td>
</tr>
<tr >
<td style="width: 100%" valign="top" align="center" >
<select title="Select a section :">
<?php
//Selecting table Sections *****************************************************************
$Sections = mysql_query("SELECT * FROM sections", $connection);
if (!$Sections)
{
die("Database query failed : " .mysql_error() );
}
while ($RowSections = mysql_fetch_array($Sections))
{
echo '<option value='.$RowSections['Description'].'>'.$RowSections['Description'].'</option>';
}
echo '</select>';
?>
</td>
</tr>
<tr>
<td style="width: 100%" valign="top" align="center">
<?php
echo '<select>';
//Selecting table Categories *********************************************************
$Categories = mysql_query("SELECT * FROM categories, section_category_link WHERE categories.id = section_category_link.CategoryId", $connection);
if (!$Categories)
{
die("Database query failed : " .mysql_error() );
}
while ($RowCategories = mysql_fetch_array($Categories))
{
echo '<option value='.$RowCategories['Description'].'>'.$RowCategories['Description'].'</option>';
}
echo '</select>';
?>
</td>
</tr>
<tr>
<td style="width: 20%" valign="top" align="center">
<?php
echo '<select>';
//Selecting table Sub_Categories ******************************************************************
$Sub_Categories = mysql_query("SELECT * FROM subcategories, category_subcategory_link WHERE subcategories.id = category_subcategory_link.CategoryId ", $connection);
if (!$Sub_Categories)
{
die("Database query failed : " .mysql_error() );
}
while ($RowSubCategories = mysql_fetch_array($Sub_Categories))
{
echo '<option value='.$RowSubCategories['Description'].'>'.$RowSubCategories['Description'].'</option>';
}
echo '</select>';
?>
</td>
</tr>
<tr>
<td style="width: 20%" valign="top" align="center">
<?php
//Selecting table Sub_Categories ********************************************************************
$Items = mysql_query("SELECT * FROM items, subcategory_item_link WHERE items.Id = subcategory_item_link.ItemId", $connection);
if (!$Items)
{
die("Database query failed : " .mysql_error() );
}
while ($RowItems = mysql_fetch_array($Items))
{
echo $RowItems["FullDescription"]. ", " .$RowItems["ShortDescription"] . ", " .$RowItems[""] . "<br />";
}
?>
</td>
</tr>
</table>
I am aware of the fact that there is no Java Script in there yet because i have no idea how to go about this ...
Any help would be appreciated
Yours sincerely
Paul