<div id = '147'>
<u><b><font color = 'blue' onClick = 'javascript:showbox(147)'>Comment </font</b></u>
</div>
<script type='text/javascript'>
<!--
function showbox(var1) {
document.getElementById(var1).innerHTML = var1 + " <form name = 'commentform' method = 'post' action = ''><input type='text' name = 'comment' value='Enter Your Comment' ><input type='hidden' value= " + var1 + " name='wallpostid'> <input type ='hidden' value = '$userid' name = 'userid' > <input type='submit' name = 'send' value='Post your Comment' onClick='javascript:postcomment()'> </form>";
<b onclick= 'postcomment()' > </b>;
}
function postcomment() {
document.commentform.comment.submit();
}
-->
</script>
Above is the code. It is working in FF but not in IE or Chrome.
Can anyone tell where I went wrong. Any solution to make it work in all browsers?