Can anyone please let me know what attributes I should use instead of these (which I have used for Internet Explorer) to work in chrome or firefox:
For changing visibility of an element:
obj.style.visibility = 'visible/hidden';
For getting the element:
document.getElementById("id");
For writing a string value into an element:
obj.innerHTML = "....";
To set or retrieve the left position of an object:
obj.style.posLeft/posTop = ...;
Or can anyone please suggest some article on browser compatibility?
obj.style.posLeft/posTopshould beobj.style.left/top, and their value must always include a unit. Other than that, the snippets you showed should work on all browsers. Also, those positioning properties only work for elements that are not “statically” positioned, i.e., elements withposition: absolute,position: relativeorposition: fixed.