Welcome to the nuBuilder Forums!

Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.

Write message to console from After save(PHP)

Questions related to using nuBuilder Forte.
Post Reply
slobodan
Posts: 25
Joined: Sat May 08, 2021 1:20 pm

Write message to console from After save(PHP)

Unread post by slobodan »

Is it possible to write "Hello World" to console from After save, using php custom code?
kev1n
nuBuilder Team
Posts: 4562
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 76 times
Been thanked: 528 times
Contact:

Re: Write message to console from After save(PHP)

Unread post 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);
slobodan
Posts: 25
Joined: Sat May 08, 2021 1:20 pm

Re: Write message to console from After save(PHP)

Unread post 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.
slobodan
Posts: 25
Joined: Sat May 08, 2021 1:20 pm

Re: Write message to console from After save(PHP)

Unread post by slobodan »

I tryed :

$j="console.log('Hello World');";
nuAddJavascript($j);

in As and BS, without any error, but nothing appeared on the console.
kev1n
nuBuilder Team
Posts: 4562
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 76 times
Been thanked: 528 times
Contact:

Re: Write message to console from After save(PHP)

Unread post by kev1n »

nuAddJavascript can be used in Before Browse, Before Edit

Use nuDebug() instead.
slobodan
Posts: 25
Joined: Sat May 08, 2021 1:20 pm

Re: Write message to console from After save(PHP)

Unread post by slobodan »

Thanks for your reply.

Slobodan
Post Reply