How to pass PHP variable value to javascript variable in view.edit.php?

Hello everyone, I want to pass $bean->id value of Case module to a javascript variable in view.edit.php file of "Case" module. I want to know, whether it is possible without using AJAX and if it is, then I would like to know, HOW TO?