No announcement yet.

Enabling "Save as" function for a HTML link

  • Filter
  • Time
  • Show
Clear All
new posts

  • Enabling "Save as" function for a HTML link

    I have code that creates a file with fopen(). If a create a link to the file (ie data.dat), it will automatically open the file as HTML. If I right click the link and select "Save target as", it defaults to saving the file as "data.htm", not "data.dat".

    My question is how to get a link to automatically come up with a "save as" pop up? If I can't obtain that functionality, I would apprepriate an answer concerning why my data.dat file is showing up as data.htm when manually saving the file.

  • #2
    Browser functionality

    This seems to be a question for your browser vendor. Our own experience with browsers has been rough--we support several of them now, but browsers behave differently and sometimes change form one version to the next. Our most successful strategy is to rely on as few browser mechanisms as possible, and then test them with each and every browser vendor and version.


    • #3
      Well do you know why my file would be showing up as data.htm? It is clearly a data.dat in the filesystem.


      • #4

        No. I am confident that it really is only data.dat on the file system. Your browser must be doing this somehow.