Page 1 of 1
Write message to console from After save(PHP)
Posted: Mon May 10, 2021 7:51 pm
by slobodan
Is it possible to write "Hello World" to console from After save, using php custom code?
Re: Write message to console from After save(PHP)
Posted: Mon May 10, 2021 8:04 pm
by kev1n
Hi,
Does it have to be in After Save?
This would work in Before Edit:
Code: Select all
$j = "
if (nuHasBeenSaved()) {
console.log('Hello World');
};
";
nuAddJavascript($j);
Re: Write message to console from After save(PHP)
Posted: Mon May 10, 2021 9:11 pm
by slobodan
I would like to write to console during application development, for debugging purposes. It is relatively easy with javascript, but from php all my tries failed.
Re: Write message to console from After save(PHP)
Posted: Mon May 10, 2021 9:50 pm
by slobodan
I tryed :
$j="console.log('Hello World');";
nuAddJavascript($j);
in As and BS, without any error, but nothing appeared on the console.
Re: Write message to console from After save(PHP)
Posted: Tue May 11, 2021 6:36 am
by kev1n
nuAddJavascript can be used in Before Browse, Before Edit
Use
nuDebug() instead.
Re: Write message to console from After save(PHP)
Posted: Tue May 11, 2021 2:21 pm
by slobodan
Thanks for your reply.
Slobodan