You can't mix Javascript and PHP together. It could be that the other browsers are being more forgiving with the name of the form.
You need to tell PHP to echo out the variable.
function checknums(){
alert("Here");
thestring=document.'<?php echo $_SESSION["formname"];?> '.member.value;