" /> Genesys Composer - ECMAScript block Issue - Genesys CTI User Forum

Author Topic: Genesys Composer - ECMAScript block Issue  (Read 1702 times)

Offline ragulkumar

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
  • Ragul
Genesys Composer - ECMAScript block Issue
« on: April 11, 2017, 11:16:34 AM »
Advertisement
Hi,

In ECMAScript block, the below code is added, it shows error in generated vxml code.

Note : The error message is "The content of elements must consists of well-formed character data or markup"

try {
if(AppState.inputmode < 10) {
AppState.slotname = 'Test';
} else {
AppState.slotname = 'Demo';
}
} catch (error) {

}


If i change the lesser than symbol (AppState.inputmode < 10) to greater than symbol(AppState.inputmode > 10), it didn't show error.

I am using version "8.1.300.33".

Kindly let me know whether it is known issue.

Thanks,
Ragulkumar

Offline deadmeat

  • Jr. Member
  • **
  • Posts: 75
  • Karma: -2
Re: Genesys Composer - ECMAScript block Issue
« Reply #1 on: April 11, 2017, 11:42:10 AM »
Maybe symbol substitution will work for you ? Try to replace < and > with &lt and &gt

Offline ragulkumar

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
  • Ragul
Re: Genesys Composer - ECMAScript block Issue
« Reply #2 on: April 11, 2017, 11:49:18 AM »
Thanks for your reply.

Yeah of course it works. I want to know is there any specific reason for not working. Whether it is version issue or anything.