18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
JSERROR ReferenceError: "top" n'est pas d
Hello,
I would like to know why when i run this script i get the following error : JSERROR ReferenceError: "top" is not defined at 2009-04-23 15:56:08
var myDate = new Date();
var myMonth = new Array(12);
var myYear = myDate.getFullYear();
var $language = top.document.links[3].textContent;
if ($language == "English")
{
myMonth[0]="January";
myMonth[1]="February";
myMonth[2]="March";
myMonth[3]="April";
myMonth[4]="May";
myMonth[5]="June";
myMonth[6]="July";
myMonth[7]="August";
myMonth[8]="September";
myMonth[9]="October";
myMonth[10]="November";
myMonth[11]="December";
}
else
{
myMonth[0]="Janvier";
myMonth[1]="F
I would like to know why when i run this script i get the following error : JSERROR ReferenceError: "top" is not defined at 2009-04-23 15:56:08
var myDate = new Date();
var myMonth = new Array(12);
var myYear = myDate.getFullYear();
var $language = top.document.links[3].textContent;
if ($language == "English")
{
myMonth[0]="January";
myMonth[1]="February";
myMonth[2]="March";
myMonth[3]="April";
myMonth[4]="May";
myMonth[5]="June";
myMonth[6]="July";
myMonth[7]="August";
myMonth[8]="September";
myMonth[9]="October";
myMonth[10]="November";
myMonth[11]="December";
}
else
{
myMonth[0]="Janvier";
myMonth[1]="F
Comments
_set($language, top.document.links[3].textContent);
should work for you
_set($path, top.location.pathname)
Get the error "top" is not defined
Update:
Changing the $path to $pathname seemed to work. Also not setting a value before the _set of $pathname seemed to help