top
and left
aren't attributes, they are CSS properties.
You can set the styles programmatically like:
ifra.style.top = '100px';
You can also use the style attribute:
ifra.setAttribute('style', 'top: 10px; left: 10px;');
Note: Do not forget that these will be ignored if the element isin't positionned absolute or relative.