472,993 Members | 2,044 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,993 software developers and data experts.

Refresh main window after download

Greetings,

I have a web application where the main window shows a list of records
available for download.
The user clicks on the download button, which posts the form to another
..php page, which generates the file for download and pops up the
download dialog.

So far, so good.

My question is - how do I refresh the main window once the download
dialog box has popped up?

I need to clear the list of records from the main window (since the
user downloaded it).

The download is generated by another page, and not the main one.

Any ideas?

Thanks,
Harold

Jul 2 '06 #1
3 4661
My question is - how do I refresh the main window once the download
dialog box has popped up?

I need to clear the list of records from the main window (since the
user downloaded it).

The download is generated by another page, and not the main one.

Any ideas?
Not sure about the actual code, but this can be done in Ajax. It sees
that the download has been "touched" by the downloader then it could
redirect or refresh to the needed page.

Once again, I don't know the actual code.. and I'm sure there's a
better way. I just like Ajax better :D

Jul 3 '06 #2
Harold Crump schrieb:
Greetings,

I have a web application where the main window shows a list of records
available for download.
The user clicks on the download button, which posts the form to another
.php page, which generates the file for download and pops up the
download dialog.

So far, so good.

My question is - how do I refresh the main window once the download
dialog box has popped up?
You could do this at the client side by outputting something like
<script type="text/Javascript">
location.replace('/mainfile.php');
</script>
<a href="/mainfile.php">Go back to List</a>

So Users without Javascript will have to click on the link, but
everybody will safely get back to the list.

HTH
Markus
Jul 3 '06 #3
Hi Markus --

Thanks for the suggestion.

The page that actually launches the download window sets
content-disposition.
Therefore, I don't think I can emit JavaScript through that page -
correct me if I am wrong.

The form in the main window simply posts to that download page, and
therefore doesn't know anything of what's going on.

The form tag on the main screen is as follows -
<form name="frmDownloadOrders" id="frmDownloadOrders" method="post"
action="startDownload.php">

The startDownload.php script generates the download stream and sets
content-disposition.

My issue is refreshing the main screen where the form is after the form
has been posted to startDownload.php

Thanks for any ideas/suggestions.

-Harold.

Markus Ernst wrote:
You could do this at the client side by outputting something like
<script type="text/Javascript">
location.replace('/mainfile.php');
</script>
<a href="/mainfile.php">Go back to List</a>

So Users without Javascript will have to click on the link, but
everybody will safely get back to the list.

HTH
Markus
Jul 4 '06 #4

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

Similar topics

3
by: Ruskin | last post by:
I have one asp page (main.asp) that opens a window, that allows the user to enter an item. This window is controlled by enter_item.asp (much the same as a modal VB window). Except, when the item is...
4
by: Andrew Alger | last post by:
ok i have two forms. Customer.aspx and Parent_Searh.aspx. There is a button on Customer.aspx that when executed runs javascript code to open up parent_search as a popup. After the user searches...
3
by: MEM | last post by:
Hello, I'd like to refresh the main or top most browser window from a child window. Specifically, child popup A is opened by a main browser window then child popup B is opened from within child...
3
by: Danny | last post by:
HI How can I refresh the main project window in code in ms access 2000 For example, I create a new table, but when I minimize the form, the table is not there until I do F5 (refresh). I do...
1
by: Helixpoint | last post by:
I have a frameset. left and main. Inside the main frame I have a IFRAME. I need to refresh the main frame when I post a form inside the IFRAME. I am trying the code below with no luck?? ...
8
by: Judy Ward | last post by:
I have an index.aspx with frames. The top frame has a navigation bar with a "Login" hyperlink. If the user has already logged in I want this link to change to "Logout". I am using forms-based...
1
by: ACaunter | last post by:
Hi all, I loop through a folder in my asp.net program and display all the images. included with all the images is 1 word document which gets downloaded.. i get the download dialog box to come up...
12
by: martin1 | last post by:
All, is there window form refresh property? I try to set up window form refresh per minute. Thanks
1
by: Altman | last post by:
I am really scratching my head with this and can't figure out how to do it or if it is possible. I have page that the user selects the items they want to import into their local program. The user...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

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.