Problem with calling Registered Function

<< Click to Display Table of Contents >>

Navigation:  Forum >

Problem with calling Registered Function

Forum link

 


 

05-24-2020, 04:03 AM:

 

Howdy All!

 

I use the following code to call a registered function in my form from javascript:

 

executeAjaxEvent(\"&BarCode=\" + res,null,\"" + UpperCase(Name) + L".OnScanTicketClick\",false, null, false)");

 

If the 'res' variable has a value of '+12345-', the value passed to my registered function is '12345-'.

 

How do I get the leading  '+' value to NOT be stripped?

 

Thanks in advance,

 

Shane

 


 

05-24-2020, 12:28 PM:

 

executeAjaxEvent(\"&BarCode=\" + encodeURIComponent(res),null,\"" + UpperCase(Name) + L".OnScanTicketClick\",false, null, false)");

 


 

05-24-2020, 04:29 PM:

 

Thanks - that worked well!

 


 

05-24-2020, 09:14 PM:

 

You're welcome.  Its actually an Alexandre fix for a similar issue I had in the past.