the following code doesn't fill the textarea when i click on button,
it's only show a blank textarea with Firefox browser, while it works
using IE browser.
Changing the method's value to 'visibility' it works using both browsers.
<html>
<head>
<script type="text/javascript">
function showObj(obj,show,method){
if (method=="visibility")
obj.style.visibility = show ? "visible" : "hidden";
else
obj.style.display = show ? "" : "none";
}
function fillTextArea(obj){
showObj(obj.parentNode,true,'display');
obj.appendChild(document.createTextNode("here i am"));
}
</script>
</head>
<body
onload="showObj(document.getElementById('sectionZ' ),false,'display');">
<div id="sectionZ">
<textarea id="fieldn" name="fieldn"></textarea>
</div>
<button onclick="fillTextArea(document.getElementById('fie ldn'));">fill
it</button>
</body>
</html>
How can I fix it using the display property?
Thanx
fusillo