I had following script for comment system working nicely until I put parameters into function call. Now instead of the function executing, it just reloads the page and bumps me up to the top. (Before, I had it not bumping and nicely inserting box.) Can anyone see error in following. Note, I gather that # is not preferred way to call functions from link, but other ways seemed rather complicated for this simple function call. Many thanks.
Note thispage is a text string ie "comments.php" while id and topicid are integers.
<script>
function showReplyBox(id,topicid,thispage) {
var replybox = '<form action = "newcomment.php" method = "post"><input type="hidden" name="comid" value="';
replybox = replybox+ id + '">';
replybox = replybox + '<input type="hidden" name="topicid" value="';
replybox = replybox + topicid + '">';
replybox = replybox + '<input type="hidden" name="thispage" value="';
replybox = replybox + thispage + '">';
replybox = replybox + '<textarea autofocus placeholder="Reply to comment" id="replyarea" rows=1 cols=72></textarea><br><button>Reply</button></form>';
var empty = "";
document.getElementById('replybox').innerHTML = replybox;
}
</script>
<body>
//link to call function
<a href="#" onclick="showReplyBox(44,142,'comments.php');return false">Reply</a
//box inserted here
<div id="replybox"></div>
</body>