Yes. But this is the only way to do it.
The execCommand interacts with the IE browser and is only able to save the
text file which is currently displayed in the browser window.
An other possibility is to open a document in a new window.
But when I tested it, there were some output errors (@ IE 5.0).
dataString = "Data to save";
dataWin = window.open("about:blank","dataWin");
dataWin.document.open();
dataWin.document.write(dataString);
dataWin.document.execCommand("saveAs",true,"data.txt");
dataWin.document.close();
dataWin.close();
Then I tried this:
dataWin = window.open("about:" + dataString,"dataWin");
...but the errors were still there.