Hi,
I do not know how to create function delete row with javascript.
perhaps someone can help me.
here is the javascript code
[code=php]<script>
function add_formrow(){
if (!this.table_formcontainer)
this.table_formcontainer = document.getElementById(“table_formcontainer”);
if (!this.table_formcontainer)
return;
var new_row = table_formcontainer.insertRow(-1);
var new_cell1 = new_row.insertCell(0);
var new_cell2 = new_row.insertCell(1);
var new_cell3 = new_row.insertCell(2);
var new_input1 = document.createElement(“input”);
new_input1.type = “text”;
new_cell1.appendChild(new_input1);
var new_input2 = document.createElement(“input”);
new_input2.type = “text”;
new_cell2.appendChild(new_input2);
var new_input3 = document.createElement(“select”);
new_input3.name=”transport[]”;
var options = [“Bike”, “Car”, “Motorbike”, “Public transport”] ;
for (var i = 0; i < options.length; i++)
{
var option = document.createElement(“option”);
option.value = options[i];
option.text= options[i];
try
{
new_input3.add(option, null);
}
catch(error)
{
new_input3.add(option);
}
}
new_cell3.appendChild(new_input3);
}
thanks