hi guyz

im new to HTML and CSS and i would to clarify the following doubt.

i have 2 pages

the index.php has a select box named "adamage", when i select the select box "atype" above, its supposed to change through AJAX and retrieve values (from a MySQL DB) for adamage according to atype

for eg. atype-art
adamage-frame, painting


The problem is that the AJAX works fine in all browsers, but the values cant get passed, also i cant get the selected value to be passed. :(

here is the Ajax code for config.php

<td>Area of damage : 
<select name="adamage" style="width:205px">
<option >select damage type</option>
<? while($row=mysql_fetch_array($result)){ ?>
<option value>
<? } ?>

which would overwrite index.php adamage

the Ajax retrieval code in the index.php are listed below

function getdamage(strURL) {		
var req = getXMLHTTP();
	if (req) {
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {						
					} else {
						alert("There was a problem while using XMLHTTP:\n" + req.statusText);
			req.open("GET", strURL, true);


<div class="mainleft">Article type:  <select name="atype" onchange="getdamage('config.php?atype='+this.value)" style="width:205px">
<option value="">select article type</option>
<option value="1">Art</option>
<option value="2">Buildings</option>

<td><div class="mainleft">
<div id="damagediv">
Area of damage : <select name="adamage" style="width:205px">
<option value="">select damage type</option>

IE uses the DOM document object model so getelementbyid() only works in IE
mozilla opera safari use a diferent model
so we can

(document.getElementById) ? dom = true : dom = false; //check for IE dom model (once)
 if (dom) {	document.getElementById('damagediv').innerHTML=req.responseText; } //IE
 else {document.getElementById('damagediv').value=req.responseText;} } //mozilla opera
/* but
also works in mozilla implementations */

// everywhere through the code
if(dom) {response ie}
else {response mozilla}

works most of the time
mozilla.org for a mozilla dom reference