Undefined variable

Wednesday, July 23, 2014 2:53:18 AM
Hi,

I'm trying to add a URL variable to my objects file so that it's easy to change when testing on different servers.  I've followed the info in here: http://www.inflectra.com/Support/KnowledgeBase/KB11.aspx

I've tried adding the variable definition to the .user and test file but wherever it's located I get an 'undefined' error.

Is there something special you need to do in order to use variables in the object file?

Cheers,
m
1 Replies
Friday, August 1, 2014 4:09:09 PM
Avatar
re: countdownSupport on Wednesday, July 23, 2014 2:53:18 AM
Hi Amanda

Without seeing the file it's hard to say exactly. I would recommend emailing your test script to support@inflectra.com and they can provide specific guidance.

Normally you need to define the variables using var g_variable = 'xxxx'; inside the main .js file.

The format would be:

if (typeof(g_variable) == 'undefined')
{
     g_variable = 'xxxx';
}



Regards
Jim
Statistics
  • Started: Wednesday, July 23, 2014 2:53:18 AM
  • Last Reply: Friday, August 1, 2014 4:09:09 PM
  • Replies: 1
  • Views: 1185