Hi, ok lemme explain what m trying to do here.

<IFRAME id="name" name="name" frameborder="0" src ="c:/testing.doc" width="200%" height="200%" scrolling="auto" MARGINHEIGHT="0" MARGINWIDTH="0"></IFRAME>

using this code my file (testing.doc) will be loading inside the browser. From here, i want to edit the contents of this file and save it.

I can do it if i click away from the ifram and then use tab key to get the focus on my document (inside iframe) and then if i click on file>save as, it gave me an option to save the document in .doc format. but if i give a button there to execute document.execCommand("SaveAs"), then it shows me a dialog box to save as 'html', probably because clicking on save button, takes the focus outside the iframe. In my javascript code, i tried using focus() with many combinations but it didn't work. I need javascript code using which i can press the tab key unless and untill i don't get focus on my frame and then execute document.execCommand("SaveAs");

Or if you have better solution, then please lemme know.

I hope, it make sense..

Anil Saini