I recently updated my nubuilder-database from version 4 to 4.5. Nearly everything works fine if I call it direct from its location but when I embed it in an iframe is see this error:
Ik can't find the reason of this. Maybe someone else?
Thanks in advance!
Error hyperlink goes to "var frame = parent.$('#nuDragDialog iframe')" in nuadmin.js (line 88)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.
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.
Javascript error when embedding nubuilder 4.5 in iframe
-
- Posts: 35
- Joined: Sat Jun 09, 2018 4:36 pm
- Location: Netherlands
- Has thanked: 6 times
- Been thanked: 1 time
- Contact:
Javascript error when embedding nubuilder 4.5 in iframe
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4581
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 536 times
- Contact:
Re: Javascript error when embedding nubuilder 4.5 in iframe
Could you exclude that line 88 for now and also the next 3 lines? I will look into it a bit later to see what is going wrong.
-
- nuBuilder Team
- Posts: 4581
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 536 times
- Contact:
Re: Javascript error when embedding nubuilder 4.5 in iframe
Try modifying nuadmin.js like this:
You do not have the required permissions to view the files attached to this post.
-
- Posts: 35
- Joined: Sat Jun 09, 2018 4:36 pm
- Location: Netherlands
- Has thanked: 6 times
- Been thanked: 1 time
- Contact:
Re: Javascript error when embedding nubuilder 4.5 in iframe
Thank you @Kev1n for fast reply!
After modifying admin.js it works like a charm in 'normal' user mode (no errors, thank you!)
For testing I went to changed (v4->v4.5) Nubuilder-locations and found some other window-related errors:
When I go to setup, forms and choose to edit a form (with the nice new buttons) I see those errors: and when I (after clearing console) go to a form in 'normal' user mode and try to edit an object (with the nice new location-buttons) I see this error:
After modifying admin.js it works like a charm in 'normal' user mode (no errors, thank you!)
For testing I went to changed (v4->v4.5) Nubuilder-locations and found some other window-related errors:
When I go to setup, forms and choose to edit a form (with the nice new buttons) I see those errors: and when I (after clearing console) go to a form in 'normal' user mode and try to edit an object (with the nice new location-buttons) I see this error:
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4581
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 536 times
- Contact:
-
- nuBuilder Team
- Posts: 4581
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 536 times
- Contact:
Re: Javascript error when embedding nubuilder 4.5 in iframe
I did some fixes to 3 file (see attachment). Please check if the errors are gone.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 35
- Joined: Sat Jun 09, 2018 4:36 pm
- Location: Netherlands
- Has thanked: 6 times
- Been thanked: 1 time
- Contact:
Re: Javascript error when embedding nubuilder 4.5 in iframe
@Kev1in, thank you very much!
Nearly every error is gone!
Up to now I only found this (new) one about windows: It's on a form with an iframe in a html-object
I also found another error about a function which isn't available: It arrived when I changed a form
Nearly every error is gone!
Up to now I only found this (new) one about windows: It's on a form with an iframe in a html-object
I also found another error about a function which isn't available: It arrived when I changed a form
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4581
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 76 times
- Been thanked: 536 times
- Contact:
Re: Javascript error when embedding nubuilder 4.5 in iframe
Does the first error occur when you run a report?
-
- Posts: 35
- Joined: Sat Jun 09, 2018 4:36 pm
- Location: Netherlands
- Has thanked: 6 times
- Been thanked: 1 time
- Contact:
Re: Javascript error when embedding nubuilder 4.5 in iframe
No it's not during creation of a pdf.
I only open a launch-form with a html-object. Inside this object I placed an iframe:
I only open a launch-form with a html-object. Inside this object I placed an iframe:
You do not have the required permissions to view the files attached to this post.
-
- Posts: 35
- Joined: Sat Jun 09, 2018 4:36 pm
- Location: Netherlands
- Has thanked: 6 times
- Been thanked: 1 time
- Contact:
Re: Javascript error when embedding nubuilder 4.5 in iframe
I think I have found a solution for the first error. It's a small bug in nuajax.js.
I changed those lines and error is gone!
I changed those lines and error is gone!
Code: Select all
var successCallback = function(data,textStatus,jqXHR){
var fm = data;
if(!nuDisplayError(fm)){
var pdfUrl = 'core/nurunphp.php?i=' + fm.id;
if(iframe === undefined || iframe === ''){
window.open(pdfUrl);
}else{
//Jannie thinks that parent can be removed, but maybe it's sometimes needed?
if (document.getElementById(iframe)){
$('#' + iframe).attr('src', pdfUrl);
}
else {
parent.$('#' + iframe).attr('src', pdfUrl);
}
}
}
};