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

Nintex Forms - use substring in Javascript

Jump to solution

Hello,

I am trying to extract part of the URL from a Hyperlink control.  In the Customer JavaScript - function, I am trying to use substring to extract the URL.  Here is the sample JaveScript:

function showText()  {   
 
var display = NWF$("#"+txtHyperLink);   

display = display.substring(0, 25);

alert(display.val());   
 
}

When I use a button control to execute the   showText function, the alert does not display on the form.  If I remove the display.substring from the function, the alert will display.   Can I not use Substring in the JavaScript function?   If not, is there another way to extract the URL from the Hyperlink control?  Or can I use the fn-substring inline function in JavaScript?

Labels: (1)
0 Kudos
Reply
3 Replies
pwarrak
Nintex Newbie

Re: Nintex Forms - use substring in Javascript

Jump to solution

Hi,

The problem is in your JavaScript code itself

Use this:

function showText() {

var display = NWF$("#"+txtHyperLink).val();

display = display.substring(0, 25);

alert(display);

}

0 Kudos
Reply
smmongol
Nintex Newbie

Re: Nintex Forms - use substring in Javascript

Jump to solution

Hi Philip,


The updated JavaScript in your reply worked.   Thanks for your help!!!


Thanks

Shannon

0 Kudos
Reply
pwarrak
Nintex Newbie

Re: Nintex Forms - use substring in Javascript

Jump to solution

Shannon Mongold

Great! So please mark the answer as correct.

BR,

0 Kudos
Reply