Working a lot in frontend environment you sometimes have to do "eval()" in javascript. That function is not standard for all browsers.
Firefox for one does not support it! No problem! Here is a simple script you can put in the top of you page. It will ensure that a working eval function is present!
Try it out! - Enter code and press "eval"
<script language="javascript" type="text/javascript">
<!--
if (typeof(eval)=='undefined') {
eval = new Function(s, '_dynamicCode = new Function(s);_dynamicCode()')
}
// -->
</script>
No comments:
Post a Comment