This topic is locked
[SOLVED]

Uncaught TypeError: strTmp1.Split is not a function

11/26/2022 12:06:19 PM
PHPRunner General questions
dageci authorDevClub member

What am I doing wrong?
I get the error "Uncaught TypeError: strTmp1.Split is not a function"
with this code in Javascript Onload event:

var ctrlOvertimeYesNo = Runner.getControl(pageid, 'OvertimeYesNo');
strTmp = ctrlOvertimeYesNo.getValue();

strTmp1 = strTmp.toString();

s = strTmp1.Split(' - ');
strRez = s[0];
dageci authorDevClub member 11/26/2022

I didn't notice that in strTmp1 I have a value of 0.
Now it everything works