Welcome to the nuBuilder Forums!

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

nuSearchAction: Uncaught TypeError

Questions related to using nuBuilder Forte.
Post Reply
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

nuSearchAction: Uncaught TypeError

Unread post by kev1n »

Hi Steven,

nuSearchAction() can produce an "Uncaught TypeError: Cannot read property 'name' of null" if it's called from a Procedure or a Custom Code.
nuSearchAction.png

Fix:

Code: Select all

function nuSearchAction(S, F){

	if(arguments.length > 0){
		$('#nuSearchField').val(S);
	}
	if(arguments.length == 2){
		$('#nuFilter').val(F);
	}

	var s	= String($('#nuSearchField').val()).replaceAll("'","'", true);
	var f	= String($('#nuFilter').val()).replaceAll("'","'", true);
	
	window.nuFORM.setProperty('search', s);
	window.nuFORM.setProperty('filter', f);
	
	var c = arguments.callee.caller === null ? '' :  arguments.callee.caller.name;
	if(arguments.length === 0 && c != 'nuGetPage'){
		window.nuFORM.setProperty('page_number', 0);
	}
	if(arguments.length >= 1){
		window.nuFORM.setProperty('page_number', 0);
	}

	nuGetBreadcrumb();
	
}
You do not have the required permissions to view the files attached to this post.
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: nuSearchAction: Uncaught TypeError

Unread post by admin »

kev1n,

That's done now.

Thanks


Steven
Post Reply