cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Nintex Newbie

Custom Javascript is not working after updating nintex form

Jump to solution

Hello,

I have a form developed on nintex form 2013, lately I updated nintex form, but after that, the working javascript before is not working after the update, any idea?

update:

The problems is not related to lookups, I implemented a javascript function to delete the repeating section rows dynamically, I add a trigger click on the the image that delete the repeating section row, my script was working fine, until I updates the nintex, I tried to to debug the javascript, everything is working fine, untill I do the click trigger.

this is the script I was calling to delete repeating section rows:

               var RSRows = NWF$("."+className).find(".nf-repeater-row:visible");
                  RSRows.each(function(){
                        var currentRow= NWF$(this);
                              currentRow.find(".nf-repeater-deleterow-image").click();  // this line cause the error                                                                                                                                 
                           });

Thanks

Reply
7 Replies
Highlighted
Automation Master
Automation Master

Re: Custom Javascript is not working after updating nintex form

Jump to solution

no ideas since you haven't provided sufficient details ...

if your scripts are related to lookups then it's 'expected', see release notes  

Reply
Highlighted
Nintex Newbie

Re: Custom Javascript is not working after updating nintex form

Jump to solution

sorry, I updated the question, please review it. thanks

0 Kudos
Reply
Highlighted
Automation Master
Automation Master

Re: Custom Javascript is not working after updating nintex form

Jump to solution

what's the error you get?

what's your form version?

have you checked it finds deleterow image element?

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Custom Javascript is not working after updating nintex form

Jump to solution

The previous version which the script was working on is nintex form 2.9.00, after the update the version is 2.9.3.1. And Yes the elements returned I checked it many times, it finds the element but it gives this error when apply .click() function:

Uncaught TypeError: Cannot read property 'value' of undefined
at HTMLDivElement.<anonymous> (JavaScriptStringHandler.ashx?resourceType=jsfile&fileName=NF.BaseDataAccessHelper.js&culture=en-US&…:790)
at HTMLDivElement.dispatch (jquery.js?rev=wUPlnhwFqtWad8lD53Aazg%3D%3D:312)
at HTMLDivElement.elemData.handle (jquery.js?rev=wUPlnhwFqtWad8lD53Aazg%3D%3D:285)
at Object.trigger (jquery.js?rev=wUPlnhwFqtWad8lD53Aazg%3D%3D:306)
at HTMLSelectElement.<anonymous> (jquery.js?rev=wUPlnhwFqtWad8lD53Aazg%3D%3D:355)
at Function.each (jquery.js?rev=wUPlnhwFqtWad8lD53Aazg%3D%3D:38)
at init.each (jquery.js?rev=wUPlnhwFqtWad8lD53Aazg%3D%3D:11)
at init.trigger (jquery.js?rev=wUPlnhwFqtWad8lD53Aazg%3D%3D:355)
at HTMLImageElement.<anonymous> (main.js:3252)
at HTMLImageElement.dispatch (jquery.js?rev=wUPlnhwFqtWad8lD53Aazg%3D%3D:312)

0 Kudos
Reply
Highlighted
Automation Master
Automation Master

Re: Custom Javascript is not working after updating nintex form

Jump to solution

I've tried your code on the same forms version and it works for me. so it looks to be something specific to your setup and/or environment. however, I tested with just one single text control within RS

could you describe (or post a screenshot) what you have in RS?

do you have any hidden or disabled controls in there? if so, which way, appearance settings or rules?

do you set some content or do you manipulate DOM within RS by a javascript code?

Reply
Highlighted
Nintex Newbie

Re: Custom Javascript is not working after updating nintex form

Jump to solution

Ok, I have repeating sections which I filled all by javascript, from response I get from service, and yes the fields in this repeating section are disabled, I disable them not from nintex control, but by adding the attribute readonly="readonly" in the text elements, because when I disable them from control settings, they won't be submitted when submit the form, I don't know why, and also I have hidden fields in the repeating section,anyway, in my case I'm filling the repeating section and delete rows all by using javascript.

This is my repeating section:

Also I hide the add row link and the delete image using css, I don't know why it was working before, and now not.

Thanks for your effort.

0 Kudos
Reply
Highlighted
Automation Master
Automation Master

Re: Custom Javascript is not working after updating nintex form

Jump to solution

hm, quite strange things. hard to diagnose remotely without knowing what's exactly going on there.

what I would try:

- base on the exception - I would try to set a breakpoint in the code where it is risen and tried to idenfify on which control exactly it fails. execption message usually contains live links into place in code, so it should quite easy to find a place where it fails

- I would rule out all the disable/hide/readonly actions, they might cause respective js variables are not created and can cause kind of errors like you experience

- if above do not help, I affraid only chance is to delete controls from RS one by one and identify which exactly causes problems.

View solution in original post

Reply