Link to home
Start Free TrialLog in
Avatar of tarrigo
tarrigo

asked on

row.insertCell

I have a javascript that puts when you click a button a new row is built with a input box inside of it. I want to put an asterick on the right side of the input box to show that it is required. I am however not sure how to do this. I was able to get it on the left side, but no luck getting it to the right. Here is the cell:


             
var cellRight = row.insertCell(0);
          var el = document.createElement('input');
          cellRight.style.backgroundColor = "#FFFFFF";
          el.type = 'text';
          el.name = 'qty' + iteration;    
          el.id = 'qty' + iteration;
	  el.onkeyup = function() { checkqty(this.value, this.id);};
          cellRight.appendChild(el);

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Zvonko
Zvonko
Flag of North Macedonia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tarrigo
tarrigo

ASKER

That worked great. I had tried something similar and it always ended up on the left. Thanks for that. Greatly appreciated.