HI
The add new line function based on JavaScript
In the quotes modules add new button call insertProductLine( ) function.
Same as we create add new button and call some other function and
Customize the function.
Example
Instead the php file create the table with id
Code:
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="productLine"></table>
Then create new button with on click function.
Customize the function like this.
Code:
var a = document.getElementById('productLine').insertRow(-1);
var a1 = a.insertCell(0);
a1.innerHTML = "<table border='0' cellspacing='0' cellpadding='0' name = 'prodservLine[]' id='prodservLine"+ln+"'></table>";
var u = document.getElementById('prodservLine'+ln).insertRow(-1);
var u1 = u.insertCell(0);
var u2 = u.insertCell(1);
var u3 = u.insertCell(2);
var u4 = u.insertCell(3);
u1.innerHTML = "<div style='padding:4px;width:145px;'>your custome code</div>";
u2.innerHTML = "<div style='padding:4px;width:270px;'>your custome code</div>";
u3.innerHTML = "<div style='padding:4px;width:150px;'>your custome code</div>";
u4.innerHTML = "<div style='padding:4px;width:208px;'> your custome code </div>";
u1.className="dataField";
u2.className="dataField";
u3.className="dataField";
u4.className="dataField";
ln++;
document.getElementById('addProductLine').onclick = function() {
insertProductLine(ln);
Bookmarks