can somebody check my code...i really don't know what's the problem is...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">
<!--
body {
margin-top: 50mm;
}
-->
</style>
<script src="gen_validatorv4.js" type="text/javascript"></script>
<script type="text/javascript">
function upperCase()
{
var x=document.getElementById("specification").value;
document.getElementById("specification").value=x.toUpperCase();
var x=document.getElementById("permohonanNo").value;
document.getElementById("permohonanNo").value=x.toUpperCase();
}
</script>
<script type="text/javascript">
function calculateTotalPrice(){
var price = parseFloat(document.borg_prolehan.price_unit.value);
var kuantiti = parseInt(document.borg_prolehan.quantity.value);
//alert(book_price);
var total = price * kuantiti;
document.borg_prolehan.total_price.value = total.toFixed(2);
}
</script>
</head>
<body bgcolor="#99ccff">
<div align="center">
<form id="borg_prolehan" name="borg_prolehan" method="post" action="fill_form.php?submit=yes">
<p>
<span id="spanOutput" style="border: 1px solid #000; padding: 3px;"> </span>
</p>
<table border="1" id="tblSample">
<tr>
<td colspan="6" align="center">PERMOHONAN PEROLEHAN : <input type="text" name="permohonanNo" id="permohonanNo" onblur="upperCase()" /></td>
</tr>
<tr>
<td width="316" colspan="6" align="center">NAMA JBT/BHG :
<select name="bahagian" id="bahagian">
<option value="0"></option>
<option value="Bahagian Teknologi Maklumat">Bahagian Teknologi Maklumat</option>
<option value="Bahagian Audit Dalaman">Bahagian Audit Dalaman</option>
<option value="Bahagian Kawalan Bangunan">Bahagian Kawalan Bangunan</option>
<option value="Bahagian Kejuruteraan">Bahagian Kujuruteraan</option>
<option value="Bahagian Kewangan">Bahagian Kewangan</option>
<option value="Bahagian Khidmat Masyarakat">Bahagian Khidmat Masyarakat</option>
<option value="Bahagian Landskap">Bahagian Landskap</option>
<option value="Bahagian Perundangan dan Penguatkuasaan">Bahagian Perundangan dan Penguatkuasaan</option>
<option value="Bahagian Penilaian">Bahagian Penilaian</option>
<option value="Bahagian Perancang Bandar">Bahagian Perancang Bandar</option>
<option value="Bahagian Perhubungan Awam">Bahagian Perhubungan Awam</option>
<option value="Bahagian Perlesenan">Bahagian Perlesenan</option>
<option value="Bahagian Perolehan dan Stor">Bahagian Perolehan dan Stor</option>
<option value="Bahagian Projek">Bahagaian Projek</option>
<option value="Unit Pusat Setempat">Unit Pusat Setempat</option>
</select>
</td>
</tr>
<tr>
<th>Bil.</th>
<th>Spesifikasi</th>
<th>Harga Seunit</th>
<th>Kuantiti</th>
<th>Jumlah (RM)</th>
</tr>
<tr>
<td align="center">1</td>
<td>
<input type="text" name="specification" id="specification" size="40" onblur="upperCase()" />
</td>
<td>
<input type="text" name="price_unit" id="price_unit" size="20" />
</td>
<td>
<input type="text" name="quantity" id="quantity" size="10" onblur="calculateTotalPrice();"/>
<input name="status" type="hidden" value="PENDING" />
</td>
<td>
<input type="text" name="total_price" id="total_price" size="20" readonly />
</td>
</tr>
<tr>
<td align="center">2</td>
<td>
<input type="text" name="specification" id="specification" size="40" onblur="upperCase()" />
</td>
<td>
<input type="text" name="price_unit" id="price_unit" size="20" />
</td>
<td>
<input type="text" name="quantity" id="quantity" size="10" onblur="calculateTotalPrice();"/>
<input name="status" type="hidden" value="PENDING" />
</td>
<td>
<input type="text" name="total_price" id="total_price" size="20" readonly />
</td>
</tr>
<tr>
<td align="center">3</td>
<td>
<input type="text" name="specification" id="specification" size="40" onblur="upperCase()" />
</td>
<td>
<input type="text" name="price_unit" id="price_unit" size="20" />
</td>
<td>
<input type="text" name="quantity" id="quantity" size="10" onblur="calculateTotalPrice();"/>
<input name="status" type="hidden" value="PENDING" />
</td>
<td>
<input type="text" name="total_price" id="total_price" size="20" readonly />
</td>
</tr>
</table>
<p>
<input type="submit" name="submit" id="submit" value="Mohon" />
<input type="reset" name="padam" id="padam" value="Padam" />
</p>
</form></div></body></html>
i try to add 3 data using same name, but it just add one data which is the first textbox row...anybody please help me....