Expand my Community achievements bar.

Invoking a function after removeInstance

Avatar

Level 2

Hi

I have a small question regarding calling/invoking a javascript function after executing removingInstance.

I have a dynamic table that allows the user to remove/add as many rows as they want. If they decide to remove a row from the table, I need to call a javascript function.

If I place the script after removeInstance I always get an undefined error, and yet if I move that same script above the removeInstance, then there are no errors

But that's not what I'm trying to achieve.

Any help would be appreciated.

Thanks

MaThandos

2 Replies

Avatar

Level 10

Hi MaThandos,

That seems to be the way it works, as soon as you delete the form object that contains the code you are executing it will stop.

Try moving your code to a function in a script object and calling that from your button.

Regards

Bruce

Avatar

Level 2

Thanks for your reply Bruce, but I tried what you suggested and it didn't quite work for me. The whole purpose was to invoke the script immediately after removeInstace has been triggered.

I finally moved the script to form:ready event of the button and it works beautifully, just hoping that it won't break anything else further on.

THanks a million

MaThandos