check if javascriptEnabled is true, before evaluating javascript in the page

this fixes #841

description:
this checks if javascriptEnabled is not set to false, before evaluating javascript in the page ..