Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Closing the pop up and downloading a file simultaneously

Reply
Thread Tools

Closing the pop up and downloading a file simultaneously

 
 
Anitha
Guest
Posts: n/a
 
      05-06-2004
Hello All,

Using Javascript and using one click, I have to close the window(pop
up) and start the download of a file simultaneously.

There will be a hyperlink in a pop up window as "Click here to start
the download". When the user clicks on it, this pop up window should
close and the file(which is behind the screen) will start to download.

Can someone please tell me how to do this or point me to the right
website where I can find an answer to this question?

Thanks
 
Reply With Quote
 
 
 
 
Dominique
Guest
Posts: n/a
 
      05-06-2004
in the main window:

function startDownload() {
do whatever e.g document.location = filename etc...
}

in the pop-up window:

(this is the onlick event for the "click here to start....")

function startDownload() {
window.opener.startDownload();
self.close()
}

"Anitha" <> wrote in message
news: om...
> Hello All,
>
> Using Javascript and using one click, I have to close the window(pop
> up) and start the download of a file simultaneously.
>
> There will be a hyperlink in a pop up window as "Click here to start
> the download". When the user clicks on it, this pop up window should
> close and the file(which is behind the screen) will start to download.
>
> Can someone please tell me how to do this or point me to the right
> website where I can find an answer to this question?
>
> Thanks



 
Reply With Quote
 
 
 
 
Anitha
Guest
Posts: n/a
 
      05-07-2004
Thanks, your idea works.

But I want to download .ppt files in IE and Netscape. For .ppt files,
the file opens but immediately goes to the slideshow mode and so the
user can only view and not download the file.

How do I make them save the .ppt file?

OR

Now what I want to do is, open the .ppt in a new window(as opposed to
open it in the main window) and somehow make them download or open the
file not in slideshow mode.

Can you please help me with this?

Thanks

"Dominique" <> wrote in message news:<c7e8qb$sd0$>...
> in the main window:
>
> function startDownload() {
> do whatever e.g document.location = filename etc...
> }
>
> in the pop-up window:
>
> (this is the onlick event for the "click here to start....")
>
> function startDownload() {
> window.opener.startDownload();
> self.close()
> }
>
> "Anitha" <> wrote in message
> news: om...
> > Hello All,
> >
> > Using Javascript and using one click, I have to close the window(pop
> > up) and start the download of a file simultaneously.
> >
> > There will be a hyperlink in a pop up window as "Click here to start
> > the download". When the user clicks on it, this pop up window should
> > close and the file(which is behind the screen) will start to download.
> >
> > Can someone please tell me how to do this or point me to the right
> > website where I can find an answer to this question?
> >
> > Thanks

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
stdout and stderr to console and file simultaneously ids C Programming 4 04-14-2009 12:14 AM
Closing popup window when closing parent window? =?Utf-8?B?Vk1J?= ASP .Net 3 02-15-2007 08:29 AM
Closing the doors 15 minutes before closing. doofus Computer Support 12 06-11-2005 08:20 AM
Closing the pop up and downloading a ppt file not in slideshow mode Anitha Javascript 0 05-10-2004 01:57 PM
Closing child window WITHOUT closing parent thomas Javascript 0 10-23-2003 04:10 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57