SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict Phil-man's Avatar
    Join Date
    Nov 2000
    0 Post(s)
    0 Thread(s)

    Can someone tell me if cross-posting is frowned upon here? I couldn't find an answer in "help". Anyway, I also posted the following in the Client Side Scripting forum.

    Two-part question here:

    1) Not sure if this is possible or not. Perhaps it's even easy, I don't know. Suppose I have a link to a file called "thisisthetext.txt". When a user clicks on the link, I need the browser to open a "Save As" dialog box and NOT read the file in the browser. Unfortunately, changing the file/extension isn't an option for me in this case. It has to stay as is (don't ask why...).

    2) This part is bizarre... once you get the browser to open a "Save As" dialog box, is it possible to write a different string to the "File Name" field in the dialog box? I know you're probably thinking "the user can just change it to anything they want", but it's actually not an option in this case.

    So, in short, a user clicks on a link to a file called "thisisthetext.txt", a "Save As" dialog box opens up with something like "text123.txt" in the File Name field, and the contents of thisisthetext.txt are stored on the users hard drive as text123.txt.

    Is this possible? I have PHP and JavaScript at my disposal. Even if they aren't both possible, any help with either one would be greatly appreciated. Thanks!

  2. #2
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Sydney, Australia
    0 Post(s)
    0 Thread(s)
    Yeah cross-posting is not welcomed. You posted in Client Side Scripting too. Don't worry, one of the moderators will sort it out.

    As for you question, sorry I can't help. But there are many smart ppl visiting here - so someone will likely have an answer.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts