 |
|

03-12-2004, 11:30 AM
|
|
|
|
Creating "Save as..." Popup in Javascript
i have a question, okey maybe it's not directly relevant with PHP.
i have a webpage that contains .doc and .txt files, of course when you click any icon with left mouse click then windows opening the .doc or .txt files.
can i propmt the user with "save target as" dialog box when he/she left click to icons with java script? i dont want to tell them that hey, please right click and save (and i dont wanna zip the files).
How can i do this? it is possible with java (xor with PHP help)?
__________________
SEO Tutorial
Bob's quote of the week:
SEO Bob: "world cup of hockey is starting isn't it [, Dilligaf]? Who are you cheering for dilli?"
Dilligaf: "Well... if you promise not to tell my neighbours... "Oh Canada... ""
|

12-20-2004, 02:36 PM
|
 |
SEO
|
|
Join Date: Apr 2004
Location: columbus ohio usa
Posts: 517

|
|
|
asp forced file download script
hey bob!
heres the asp solution...its a nifty one.
see the bottom of this thread:
frontpagewebmaster.com/m-229698/tm.htm
working solution here:
wichitaswimclub.org/results/sSort.asp
hope it helps a bit.
[m]
|

01-14-2005, 06:05 PM
|
|
SEO Junior
|
|
Join Date: Jan 2005
Posts: 5
|
|
Re: asp forced file download script
Hi, relaxzoonlander,
your link above is what I just want, I am headache two days for it, but from the link, I cann't see how they do it, can you give the source codes to show how to do it? I create a word file in server side in ASP, I want the client can save it at the client side, but when user open it, either there is nothing, or is binary file, what's wrong?
Give me some instructions! tks!!!!!!!!!!
Andraw
|

01-14-2005, 10:59 PM
|
 |
SEO
|
|
Join Date: Apr 2004
Location: columbus ohio usa
Posts: 517

|
|
|
zoolander...relaxzoolander.
Quote:
|
Originally Posted by Andraw
Hi, relaxzoonlander,
your link above is .............
Andraw
|
when you get my name right....i may think about your request.
.
|

01-15-2005, 04:48 PM
|
|
SEO Junior
|
|
Join Date: Jan 2005
Posts: 5
|
|
|
relaxzoolander,
Sorry about that, please think about my problem as soon as possible. Urgent??
Andraw.
|

01-15-2005, 05:24 PM
|
 |
SEO GUY Moderator
|
|
Join Date: May 2004
Location: Tampa Bay
Posts: 2,872

|
|
|
You can call me Zoonlander, just don't remind me of my world cup of hockey statement (smiley here). The code is available in the thread that RelaxZoolander referenced (frontpagewebmaster.com/m-229698/tm.htm) in the last post.
Just click "View Code" (and that is pretty trick, thanks)
__________________
OverSite - A unique web directory for quality sites ONLY.
|

01-16-2005, 07:35 AM
|
|
SEO Junior
|
|
Join Date: Jan 2005
Posts: 5
|
|
|
relaxzoolander,
The little boy above is so dorable.
Thanks for the link for source codes . Is the file is word file with picture/header/footer, when user download it, they will be lost? I test one using almost the same code, only the content in the main page appear, the header is lost, is it normal?
|

01-16-2005, 07:44 AM
|
 |
SEO GUY Moderator
|
|
Join Date: May 2004
Location: Tampa Bay
Posts: 2,872

|
|
|
I'm actually Dilligaf but thanks for the compliment. So the file is downloading and not opening up the program on your machine?
I'm a Word newb, but I'd guess it's how the program accesses images NEBody else? When you send images in a word file do you have to send the images like you would in html?
__________________
OverSite - A unique web directory for quality sites ONLY.
|

01-16-2005, 07:55 AM
|
|
SEO Junior
|
|
Join Date: Jan 2005
Posts: 5
|
|
|
Hi, All,
I have another question. I create a page with two frames,
the lower one with buttons "Back" "Update Report", "Download";
the upper frame display the dynamically generated report.
when user click the "Download" button, the report will be download by user. What's the best way to do it in ASP. If possible, I dont want to save the report file in the server side. I think about two ways to do it:
1: display the report generated by html on the upper frame, if user click the "download" button, open a new window, dynamic generate a word report ( "report.doc") based on word template, force the user to save it. when user close the new created window, remove the "report.doc" file from server. -------- not a good option, I have to double work.
2: the upper frame also display the "report.doc", this way I don't have to do the double work, but how can I make sure the file will be deleted. when user close the download window, I cann't delete it, maybe the file is displayed in the upper frame. when the window with frames is closed, I still cann't delete it, because the use didn't close the download window. ------ how to deal this problem.
May be the above ways are not good options for you, do you have any better way to solve it. Remember the report is dynamic generated according to data in database.
Waiting for your reply to make my decision.
Andraw
|

01-16-2005, 08:03 AM
|
|
SEO Junior
|
|
Join Date: Jan 2005
Posts: 5
|
|
|
Dilligaf,
"When you send images in a word file do you have to send the images like you would in html?"----------------- what this mean????
When download a file, I open the word file, put all the contents in ADODB.Stream, the use Response.Binary to write the stream to screen, the images are already in the word file, how can i put them in html?
Andraw
|
 |
|
| Thread Tools |
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|