Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Error in function nuSetTitle() Topic is solved
Error in function nuSetTitle()
Hello.
Function nuSetTitle() doesn't work - form title remains old after calling this function. Only works in popup mode, when there is no "Logout" icon in the breadcrumb line. It seems that because of the "Logout" element (has the nuNotBreadcrumb class), the index for the jQuery call, setting the title, is incorrectly counted.
Function nuSetTitle() doesn't work - form title remains old after calling this function. Only works in popup mode, when there is no "Logout" icon in the breadcrumb line. It seems that because of the "Logout" element (has the nuNotBreadcrumb class), the index for the jQuery call, setting the title, is incorrectly counted.
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: Error in function nuSetTitle()
Hi,
There's been a fix recently. Not sure if that helps though.
https://github.com/nuBuilder/nuBuilder- ... b870c8d90a
There's been a fix recently. Not sure if that helps though.
https://github.com/nuBuilder/nuBuilder- ... b870c8d90a
Re: Error in function nuSetTitle()
in github diff there is one version, but version in release archive is different
I've got an error within nuform.js version in release archive.
I suggest to substract $('#nuLogout').length then counting index.
Or, if class '.nuNotBreadcrumb' is assigned only to the LAST item in breadcrumb, count only $(''.nuBreadcrumb').length.
I've got an error within nuform.js version in release archive.
I suggest to substract $('#nuLogout').length then counting index.
Or, if class '.nuNotBreadcrumb' is assigned only to the LAST item in breadcrumb, count only $(''.nuBreadcrumb').length.
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: Error in function nuSetTitle()
OK. The latest release has an older version of css. Is it safe to use the latest 'master' branch (not yet included in the release)?
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: Error in function nuSetTitle()
You may use the master branch or just use its updated nuform.js, nubuilder4.css
-
- Posts: 148
- Joined: Mon Dec 05, 2011 12:23 pm
- Location: Newton Abbot, UK
- Has thanked: 1 time
- Been thanked: 1 time
Re: Error in function nuSetTitle()
I just noticed this issue. Copied nuform.js & nubuilder4.css from master but doesn't work. Is there a fix available?
DB Version: V.4.5-2023.02.21.01
Files Version: V.4.5-2023.02.21.00
DB Version: V.4.5-2023.02.21.01
Files Version: V.4.5-2023.02.21.00
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: Error in function nuSetTitle()
I'm sorry to hear that the nuSetTitle() function is not working as expected. To better assist you, I would need more information about the specific context in which you're using this function.
Are you using nuSetTitle() on a main form or a popup form, Browse, Edit, etc?
Are there any error messages in the browser's console after calling the function?
A screenshot could help as well.
Once I have more information about your implementation, I'll be better equipped to help you troubleshoot and find a solution to your issue.
Are you using nuSetTitle() on a main form or a popup form, Browse, Edit, etc?
Are there any error messages in the browser's console after calling the function?
A screenshot could help as well.
Once I have more information about your implementation, I'll be better equipped to help you troubleshoot and find a solution to your issue.
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
-
- Posts: 148
- Joined: Mon Dec 05, 2011 12:23 pm
- Location: Newton Abbot, UK
- Has thanked: 1 time
- Been thanked: 1 time
Re: Error in function nuSetTitle()
I'm using it in the "Custom Code" section of the form to change the breadcrumb on edit forms, for example
If I use the nuform.js from github master, the login screen is visible (though badly formatted if I also use the new nubuilder4.css) and I cannot get the application to load. The following (abbreviated) messages are in the console:
I'm running on Arch Linux with PHP 8.2.4 & Apache 2.4.56
Neil.
Code: Select all
if (nuFormType() == 'edit'){
nuSetTitle($('#emp_forename').val()+' '+$('#emp_surname').val());
}
Code: Select all
Uncaught SyntaxError: expected expression, got '<'
Uncaught ReferenceError: nuUXOptions is not defined (from index.php:112)
Uncaught ReferenceError: nuMainForm is not defined (from index.php: 204)
Uncaught ReferenceError: nuBuildForm is not defined
Neil.