Jump to content


This topic is now archived and is closed to further replies.


Dynamic loading of list boxes using onChane

Recommended Posts

Hi All,

I have 3 list boxes,The first list boxes contains the project names and the second list box contains module names and the third list box contains sub module names.

All the project names,module names and its sub modules have there own separate master tables.

what is expected is, if i click the project name only its respective module names shld be displayed and if i click the module name only its sub modules shld be displayed.

i am able to do for 2 list boxes tht is if i select the project all its sub modules are displayed i want the same to be happend for sub modules too?

i am using php with mysql

the code which i used is as follows:


function window_onload() {
var qs=location.search.substring(1,location.search.length);
var pair = qs.split('=');
temp = unescape(pair[1]).split('+');
function Product_onblur()
var my_prd= "";
var index1=document.form1.prd_name.selectedIndex
window.location.href = unescape("log_defect.php"+"?prod_name="+my_prd);

php code:

<select style="border-style:none; FONT-SIZE: 10pt; WIDTH: 137px; COLOR: #222222; " name="prd_name" style="font-size: 10pt" tabindex="2" onChange="return Product_onblur()">
$query=mysql_query("SELECT prod_name name FROM dt_product order by prod_name ASC",$connection )or die ("cant do it");
while ($result=mysql_fetch_array($query))
echo '<option value="' . $result['name'] . '">' . $result['name'] . '</option>';


can anybody help me,

Thanks in advance

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.