To work with Javascript inside PHP events you should use an “echo” from PHP to call a script tag.
example:
echo “<scrip>alert(‘Testing Javascript in PHP events’);</script>”;
To work with Javascript inside PHP events you should use an “echo” from PHP to call a script tag.
example:
echo “<scrip>alert(‘Testing Javascript in PHP events’);</script>”;
Re: Javascript in PHP events
Hi Vitor,
the Syntax is not correct (as well as in the most procedures, that are created with the sc_macro-wizzard):
echo “<script>alert(‘Testing Javascript in PHP events’);</script>”;
Changed “<scrip>” to “<script>”…
regards,
Steffen
Re: Javascript in PHP events
Thanks Steffen, a “t” was missing.
echo “<script>alert(‘Testing Javascript in PHP events’);</script>”;
Re: Javascript in PHP events
Hi Vitor,
Same way JS inputbox can be used in SC v5.1
var answer = prompt (“What is your age?”,“20”);
alert (“You are " + answer + " years old.”)
advise
Regards
Dhana
Also this one works:
?> alert(‘Testing Javascript in PHP events’); <?php