[MX]getURL Javascript - Array Question

Hello,

I’m trying to get the code below to work, but no such luck:


var newsAry = new Array("news/040720.html");

for(i=1; i<=newsAry.length; i++) {
	this["btn" + i].index = i;
	this["btn" + i].onRelease = function() {
		 getURL("javascript:openNewWindow(" + newsAry[this.index - 1] + ",'newswin','height=400,width=450,toolbar=no,scrollbars=yes')");
	}
}

I’m trying to get the ‘newsAry’ Array to work in the javascript getURL action. When I use a regular html page in there the page works just fine. Any ideas as to what I’m doing wrong?

Foo :rd:

Sorry I just figured this out. Heres the answer if anyone cares:


var newsAry = new Array("news/040720.html");

for(i=1; i<=newsAry.length; i++) {
	this["btn" + i].index = i;
	this["btn" + i].onRelease = function() {
		 getURL("javascript:openNewWindow('" + newsAry[this.index - 1] + "','newswin','height=400,width=450,toolbar=no,scrollbars=yes')");

	}
}

toolbar=no,scrol lbars=yes
works??
waddya know…javascript is starting to understand more human speak!! lol i thought it had to be a boolean and dont those 2 spaces in the middle of the word scrollbars interrupt? :S

Prophet.