<script>
function percentShow(a,b) {
if(b==5){
alert(b);
alert(document.getElementById('mydiv1'));
document.getElementById('mydiv1').style.backgroundColor = 'blue';
document.getElementById('mydiv1').style.width = '50%';
}
}
</script>
Fatal error: Uncaught Error: Using $this when not in object context in /in/liTJj:17
Stack trace:
#0 {main}
thrown in /in/liTJj on line 17
Process exited with code 255.
<script>
function percentShow(a,b) {
if(b==5){
alert(b);
alert(document.getElementById('mydiv1'));
document.getElementById('mydiv1').style.backgroundColor = 'blue';
document.getElementById('mydiv1').style.width = '50%';
}
}
</script>
Fatal error: Using $this when not in object context in /in/liTJj on line 17
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9
<script>
function percentShow(a,b) {
if(b==5){
alert(b);
alert(document.getElementById('mydiv1'));
document.getElementById('mydiv1').style.backgroundColor = 'blue';
document.getElementById('mydiv1').style.width = '50%';
}
}
</script>
Fatal error: Call to a member function on a non-object in /in/liTJj on line 17
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<script>
function percentShow(a,b) {
if(b==5){
alert(b);
alert(document.getElementById('mydiv1'));
document.getElementById('mydiv1').style.backgroundColor = 'blue';
document.getElementById('mydiv1').style.width = '50%';
}
}
</script>
Fatal error: Call to a member function on a non-object in /in/liTJj on line 17