J
JAG
I am getting an error using the replace method in one of my functions.
I am using the replace method in the mail document function in my
frameset .hta to change forward slashes to back slashes in the myVar
string.
The myVar string is obtained in my show document function:
myVar = filename;
In my mail document function:
myVar = myVar.replace(/\//g,"\\");
This works as expected.
I have a history function that gets called when the back button is
clicked in my .hta. The myVar variable then gets its value from my
history array:
myVar = myLink[n].href;
When the mail document function is invoked and the replace method
called I get the error 'Object doesn't support this property or method'
on the replace line.
I have verified the myVar string both with and without using the
history function and both return identical strings (at least visually
in my alert dialog).
Does anyone know why the replace fails when myVar gets its value from
my history array? Must be something fundamental I'm missing but I can't
figure out what it is.
Thanks in advance for any help.
I am using the replace method in the mail document function in my
frameset .hta to change forward slashes to back slashes in the myVar
string.
The myVar string is obtained in my show document function:
myVar = filename;
In my mail document function:
myVar = myVar.replace(/\//g,"\\");
This works as expected.
I have a history function that gets called when the back button is
clicked in my .hta. The myVar variable then gets its value from my
history array:
myVar = myLink[n].href;
When the mail document function is invoked and the replace method
called I get the error 'Object doesn't support this property or method'
on the replace line.
I have verified the myVar string both with and without using the
history function and both return identical strings (at least visually
in my alert dialog).
Does anyone know why the replace fails when myVar gets its value from
my history array? Must be something fundamental I'm missing but I can't
figure out what it is.
Thanks in advance for any help.