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 only do this by sending your data to a server-side language, which can write to files. Then you could send the location of the file back and redirect the user there.