cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Client id in javascript variable is undefined using jquery

I have a textarea control and i'm trying to set its value through a javascript button, but when i try to access it using NWF$('#' + textarea).value("Hello"), i'm getting an error saying 'textarea' is undefined. 'textarea' is my client id javascript variable set it on the textarea control. The error i get it when i use the IE console executing the javascript code.

clientid.PNG

js.PNG

What am i doing wrong?

Thanks in advance!

Labels: (2)
Reply
5 Replies
Highlighted
Workflow Hero

Re: Client id in javascript variable is undefined using jquery

Try with NWF$

or you can call funtionMiFuncion() and then write this function on the Form Script section

Other references >>> Nintex Forms and JavaScript basics

Buena suerte!

0 Kudos
Accept as Solution Reply
Not applicable

Re: Client id in javascript variable is undefined using jquery

I've tried that, forgot to put it back when i made the print.

This is what i'm getting using IE console:

textarea.PNG

I've also read that javascript doesn't properly work using the preview form, so i published it, but doesn't solve the problem.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Client id in javascript variable is undefined using jquery

Well, the preview-function is actually using an iframe, which makes the console a little bit hard to use. Are you opening the form as a dialog or in full-screenmode? Dialog is also using an iframe, but in full-screen it shoud look like this:

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Client id in javascript variable is undefined using jquery

Have you tried Henning Eiben's suggestion?

Once published and opened in a page, do you have javascript errors (is NWF$ still undefined?) in your Nintex form?

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Client id in javascript variable is undefined using jquery

can you try to give the function name i.e ClientClick() and in the form setting define your function ClientClick() {  NWF$('#' + textarea).value("Hello") }

0 Kudos
Accept as Solution Reply