473,698 Members | 2,630 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Download box from a webpage

Hi Guys,

I am trying to mimic the behavior of download.com... where a page says
"your download will start in 10 seconds" and then the download box
pops up. Would anyone mind telling me how that works? I want to use
this as an alternative to "click here to download the file" and then
directly link to the file. Any help is appreciated.

Thanks!
Kyle
Dec 13 '07 #1
3 1276
"kyle" <an*********@gm ail.comwrote in message
news:22******** *************** ***********@b40 g2000prf.google groups.com...
I am trying to mimic the behavior of download.com... where a page says
"your download will start in 10 seconds" and then the download box
pops up. Would anyone mind telling me how that works? I want to use
this as an alternative to "click here to download the file" and then
directly link to the file. Any help is appreciated.
One way to do it is to add a piece of JavaScript inside the page that you
send to the browser. That code uses a JavaScript Timer to count the 10
seconds, and when the timer fires it posts back to the server. The new page
to which the browser has posted does a response.Binary Write(...) to send the
file to he browser, after setting the Headers to indicate the filename and
MIME type. (Note: the latter is more efficient if done from a .ashx instead
of a .aspx).

Dec 13 '07 #2
Most of these use the META Refresh tag to do this:

<meta http-equiv="refresh" content="10; URL=http://www.mysite.com/file.zip">

-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com
"kyle" wrote:
Hi Guys,

I am trying to mimic the behavior of download.com... where a page says
"your download will start in 10 seconds" and then the download box
pops up. Would anyone mind telling me how that works? I want to use
this as an alternative to "click here to download the file" and then
directly link to the file. Any help is appreciated.

Thanks!
Kyle
Dec 13 '07 #3
Alberto, Peter,

Would these approaches redirect the browser to a different page? I
think Kyle is trying to keep the current page from changing.

-James
Dec 13 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3029
by: Alex | last post by:
Hi, Everyday, I download data from a webpage and manually input data into my MS Access database. I am thinking of automate the routine by a VB script. The webpage I am visiting will return a csv file, with only one row. In this row, there are several columns of data. I would like to add these data as a NEW row in my data base.
5
4953
by: Alan Zhong | last post by:
i wonder how to download a webpage automatically using a C# program with WebClient class. i tried it and it's working. but somehow the data it gets is different than the page shown in microsoft internet explorer. and i wonder how to get around the login problems. the C# programs only downloads the login page, do i need to "instruct" the program to access the cookie information on my window? thankx
18
16395
by: jmd | last post by:
Hello, I posted the following in the C# forum but without one answer. But perhaps now in vb.net someone has some guidelines ! This is my question : I want to write a vb.net program that does completely automatically what, until now, I do manually, witch is describe below : 1. I launch IE (6)
0
1385
by: ravibrl | last post by:
Hey I need c++ code to access a webpage and download some software. If I execute that it should download that software and it should install it in my system. Give suggestions how to write that code or send it.
2
1502
by: NOSPAM plz | last post by:
Hey, My problem is, is it possible to download parts of a file while. i think is it is called threading My code thats download the whole webpage, and stunds the app while is is downloading: -----------CODE----------- import urllib
1
1690
by: skinymike | last post by:
when i allow user to download a media file such as midi or wav files. It automatically open the files using Windows Media Player. Its fine works ok. But when i allow user to download a theme files such as *.sis or *.thm , Windows does have the software to open file such as sis or thm. But the Popup menu doesnt show Save Open Cancel. It used to show the Popup menu but now it doesnt show. i even try to use the correct path for testing...
1
1098
by: I Haas | last post by:
C#, .Net framework 1.1 visual studio 2003 From a aspx page I want to open the dialog box (download;save/open/cancel) I want to close the aspx page after the dialogbox opens. I open the dialog box from "Register.aspx.cs" with Response.Redirect(sPathAndFile,false); where sPathAndFile is the path and filename of a zipfile. The sPathAndFile is filled by calling an SQL server database just before the Redirect
1
1292
by: smitanaik | last post by:
how to write an api to download contents from webpage
10
1735
by: CJ | last post by:
Can someone tell me how to download a webpage complete with images and insert it into a richtextbox? Thanks
1
1268
by: jambalapamba | last post by:
Hi all, I want to download images,css,js files referenced by a webpage. I am doing this by downloading the HTML of webpage and getting all the URL references in the html and using URL and WebRequest downloading the images and css files. Is there any better way of doing this.Its taking a long time with my method. Any suggestions will be great thaking you in advance.
0
8683
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9170
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8901
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7739
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2336
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.