can any body tell me how i create a .txt file using javascript which is browser compatable too.
and after creating the file it gives the save as diaglog box so that
You can't do this, for hopefully obvious security reasons. JavaScript has no access to the file system...in IE it's not JavaScript, but ActiveX doing this...it just has a JavaScript API exposed.
The problem isn't that Firefox doesn't do this...it's that IE ever allowed it :)
In this post In Firefox, Write to a File using Javascript?