I try to execute a simple script with a click event, on the "html() scripting command" and I got an error message..
I use a simple JavaScript function as test :
Code: Select all
html("
<html>
<body>
<p id="demo" onclick="myFunction()">Click me to change my text color.</p>
<script>
function myFunction() {
document.getElementById("demo").style.color = "red";
}
</script>
</body>
</html>
");
if executed on .html page it work, but if as try the same inside the html() script command of xyplorer it crash...
why it crash ? can we improve ?
for additional test i try without the onclick event :
Code: Select all
html("
<html>
<body>
<p id="demo">change my text color.</p>
<script>
document.getElementById("demo").style.color = "red";
</script>
</body>
</html>
");
thanks
XYplorer Beta Club