As simple as the title says.
I have a bunch of scripts that work over some javascript code and should execute that code when pressing a button. I use the eval function to do that and it works fine on:
- GOOGLE CHROME
- SAFARI
- OPERA
- INTERNET EXPLORER (?!?)
Surprisingly this doesn't work on Firefox and if I open the console here is the error I get: [12:17:58.447] ReferenceError: undefinedundefinedundefinedundefinedundefined is not defined
Any idea on how to make it work even on FF?
EDIT. here's the code I use. so much to work on!
function exec_code() {
var code= document.getElementById("code").innerText;
eval (code);
}