Karl Blessing
Programmer
I have a javascript function, but I Cant use it because it keeps saying cannot use object or something like that, here the function with the line highlighted
[tt]
function createArray(n, init)
{
var i = 0
[red]this.length = n[/red]
for(i = 1; i<n; i++)
{
this = init
}
return this
}
[/tt]
keeps saying Line : 15, object does not support this action, but it worked fine on an htm page I had in the same directory, that same function. [sig]<p>Karl<br><a href=mailto:kb244@kb244.com>kb244@kb244.com</a><br><a href= </a><br>Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)<br>
[/sig]
[tt]
function createArray(n, init)
{
var i = 0
[red]this.length = n[/red]
for(i = 1; i<n; i++)
{
this = init
}
return this
}
[/tt]
keeps saying Line : 15, object does not support this action, but it worked fine on an htm page I had in the same directory, that same function. [sig]<p>Karl<br><a href=mailto:kb244@kb244.com>kb244@kb244.com</a><br><a href= </a><br>Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)<br>
[/sig]