Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

use nuAddJavascript() in After Browse. [done]

Post your ideas & suggestions for new nuBuilder features or other improvements
Locked
steven
Posts: 370
Joined: Mon Jun 15, 2009 10:03 am
Has thanked: 52 times
Been thanked: 52 times

use nuAddJavascript() in After Browse. [done]

Unread post by steven »

Hi kev1n,

nuAddJavascript() is currently not useable in After Browse.

But I believe if you were to change the current line to this, it would.

Code: Select all

	$f->lookup_javascript	= nuObjKey($GLOBALS,'EXTRAJS', '') . ";$r->sob_lookup_javascript";
lupj.PNG
Steven
You do not have the required permissions to view the files attached to this post.
A short post is a good post.
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: use nuAddJavascript() in After Browse.

Unread post by kev1n »

Steven,

I tried that by adding

Code: Select all

nuAddJavascript('alert("hello")');
in AB but the alert box didn't show up.

The reason is that nuAddJavascript() only assigns this extra js if isset($GLOBALS['EXTRAJS']);

By adding

Code: Select all

$GLOBALS['EXTRAJS']		= '';
in nuGetOtherLookupValues()

the alert box will be displayed.
extr.jpg
Can you try this out and see if it works?
You do not have the required permissions to view the files attached to this post.
steven
Posts: 370
Joined: Mon Jun 15, 2009 10:03 am
Has thanked: 52 times
Been thanked: 52 times

Re: use nuAddJavascript() in After Browse.

Unread post by steven »

Kev1n,

You're right.

Actually, I did that too but had forgotten.


Steven
A short post is a good post.
kev1n
nuBuilder Team
Posts: 4297
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: use nuAddJavascript() in After Browse.

Unread post by kev1n »

This is now on Github.
Locked