PC Review


Reply
Thread Tools Rate Thread

Closing Page automatically after load.

 
 
jack
Guest
Posts: n/a
 
      6th Jun 2007
I have created a form which generates an excel file from the dataset
and is working fine.
The only problem is after the excel is generated the blank page still
exist on the screen.
I tried a lot the unload it automatically by close window javascript
to be called in the body tab of the page. but couldn't make it


i would be glad to know the solution.
Thanks for replying me

 
Reply With Quote
 
 
 
 
=?ISO-8859-1?Q?Morten_N=F8rgaard?=
Guest
Posts: n/a
 
      6th Jun 2007
jack skrev:
> I have created a form which generates an excel file from the dataset
> and is working fine.
> The only problem is after the excel is generated the blank page still
> exist on the screen.
> I tried a lot the unload it automatically by close window javascript
> to be called in the body tab of the page. but couldn't make it
>
>
> i would be glad to know the solution.
> Thanks for replying me
>


Hello Jack,

you should be able to close the window by way of javascript. Can you
post some of your code...?
 
Reply With Quote
 
jack
Guest
Posts: n/a
 
      6th Jun 2007
strHeader.Append("<html><body onload='javascript:window.close();'>")

This is what i am doing to create a excel page now the file gets
created but even thought the event is set in the page load it is not
getting closed.


Please help

 
Reply With Quote
 
jack
Guest
Posts: n/a
 
      7th Jun 2007
guys please help couldn't break the solution.

 
Reply With Quote
 
Damien
Guest
Posts: n/a
 
      7th Jun 2007
On Jun 7, 10:25 am, jack <gautams.m...@gmail.com> wrote:
> guys please help couldn't break the solution.


Without being able to see any of your code, it's difficult to know how
to help.

At a wild guess, you've got a page (Page1.aspx) which contains a link
to a second page (Page2.aspx). Page2.aspx creates the excel file and
sends that as it's response, and marks the content disposition as an
attachment (thus suggesting to the browser that it open the file in
the appropriate application). However, the problem is that the link in
Page1.aspx includes a target specification of _blank, and so when
users are clicking on the link, it's opening a new browser window
first.

If all the above wild speculation is correct, then the fix is to
remove the target="_blank". If it's not correct, maybe you can post
some actual information that would allow us to see what the problem
is?

Damien

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
home page does not load automatically =?Utf-8?B?dHRocm9uZQ==?= Microsoft Windows 2000 DNS 4 17th Feb 2005 01:54 PM
Automatically Load Web Page on PowerPoint Slide Duane Sears Microsoft Powerpoint 1 9th Mar 2004 01:16 AM
IE 6.0 Browser is closing automatically once the page is downloaded Sanjeev Windows XP Internet Explorer 0 9th Nov 2003 04:23 PM
Automatically load page after viewing initial page Roger Microsoft Frontpage 0 10th Aug 2003 03:53 PM
Page automatically emailed on load Shona Microsoft Frontpage 7 8th Jul 2003 03:15 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:47 AM.