"Save As" dialog box appears twice

The application I'm currently developing (jsp-s) offers the possibility of exporting some info as excel or txt files. When I export an excel file, everything is in order. When i try to export a txt file, the Save As dialog box appears twice (relevant or not, first time with the <Always ask before opening this type of file> disabled and the second one with the same checkbox enabled). The <Save Us> dialog box appears twice only for the Open button, not Save.