473,587 Members | 2,607 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Binary Stream opens in same frame instead of new window

We have some doc mgt "lite" on our site. I basically have a window with
a button that opens the relevant document (Excel, PDF, etc.). The
button calls some javascript which basically performs a window open:

window.open('do cument.asp?item =' + intDoc,'_self', '');

I use '_self' so that the document.asp itself does not open a new
browser. the document.asp file basically retrieves the path and
displays the document via the ADODB Stream object:

select case vType
Case "DOC", "RTF"
Response.Conten tType = "applicatio n/x-msword"
Case "PDF"
Response.Conten tType = "applicatio n/pdf"
Case "XLS", "CSV"
Response.Conten tType = "applicatio n/x-msexcel"
end select

set objStream = server.CreateOb ject("ADODB.Str eam")
objStream.Open
objStream.Type = adTypeBinary
objStream.LoadF romFile strFile

Response.Binary Write objStream.Read

For me and most every user, when we click the button on the original
page, we first get the "File Download" pop-up and then - assuming you
click Open - the document opens in a new window: Adobe for PDFs, Excel
for excel docs, etc. For one user, documents are not opening in a new
window, but rather in the original frame where the document button is
located.

Does anyone know if this is a browser setting? something I can control
in my code? This particular user is using IE 6 and Excel 2003 and Adobe
Reader 6.0.
Thanks!

Aug 28 '06 #1
1 3133

<ax******@yahoo .comwrote in message
news:11******** **************@ m73g2000cwd.goo glegroups.com.. .
We have some doc mgt "lite" on our site. I basically have a window with
a button that opens the relevant document (Excel, PDF, etc.). The
button calls some javascript which basically performs a window open:

window.open('do cument.asp?item =' + intDoc,'_self', '');

I use '_self' so that the document.asp itself does not open a new
browser. the document.asp file basically retrieves the path and
displays the document via the ADODB Stream object:

select case vType
Case "DOC", "RTF"
Response.Conten tType = "applicatio n/x-msword"
Case "PDF"
Response.Conten tType = "applicatio n/pdf"
Case "XLS", "CSV"
Response.Conten tType = "applicatio n/x-msexcel"
end select

set objStream = server.CreateOb ject("ADODB.Str eam")
objStream.Open
objStream.Type = adTypeBinary
objStream.LoadF romFile strFile

Response.Binary Write objStream.Read

For me and most every user, when we click the button on the original
page, we first get the "File Download" pop-up and then - assuming you
click Open - the document opens in a new window: Adobe for PDFs, Excel
for excel docs, etc. For one user, documents are not opening in a new
window, but rather in the original frame where the document button is
located.

Does anyone know if this is a browser setting? something I can control
in my code? This particular user is using IE 6 and Excel 2003 and Adobe
Reader 6.0.
Thanks!
On your machine open Windows Explorer goto tools | folder options and the
File Types tab.
Scroll to and select xls then click the advanced button.
What is the state of the 'Browse in same window' check box? What about the
machine which has different behaviour?

Aug 29 '06 #2

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

Similar topics

6
8514
by: chon | last post by:
I have an ASP page that is sent a file location as a parameter. It opens this file, loads the ADODB.Stream object and does a binary write to the page forcing the download dialog to appear. This all works fine. If the user selects "Open" or "Cancel", the window closes, which is the desired behavior. If they select "Save", the location dialog...
3
5483
by: Romain | last post by:
Hello, I am writing out a binary file. I figured that the number "10" is automaticaly converted to "OD OA" instead of "OD". "OD" and "OA" are line feed and carriage return. I know it does that if the file is opened in something else than in binary mode. But in my example below, the file is really opened in binary.
2
2137
by: PhoneLover | last post by:
Hi, I have a page with this frameset: <frameset cols="185,800*" frameborder="YES" border="2" framespacing="2" rows="*" bordercolor="#FF0000"> <frame name="leftFrame" noresize src="SpagnoloLeftFrame.html"> <frame name="mainFrame" src="SpagnoloIntro.html"> in SpagnoloIntro.html I have put this javascript code (in the body):
103
48572
by: Steven T. Hatton | last post by:
§27.4.2.1.4 Type ios_base::openmode Says this about the std::ios::binary openmode flag: *binary*: perform input and output in binary mode (as opposed to text mode) And that is basically _all_ it says about it. What the heck does the binary flag mean? -- If our hypothesis is about anything and not about some one or more particular things,...
4
25649
by: Rouben Rostamian | last post by:
Consider the following demo program: #include <stdio.h> int main(void) { unsigned char c; for (c=0; c<15; c++) putchar(c);
28
2766
by: wwj | last post by:
void main() { char* p="Hello"; printf("%s",p); *p='w'; printf("%s",p); }
4
6716
by: Pedro Leite | last post by:
Good Afternoon. the code below is properly retreiving binary data from a database and saving it. but instead of saving at client machine is saving at the server machine. what is wrong with my code ?? thank you Pedro Leite From Portugal ------------------------------------
12
16144
by: Registered User | last post by:
I've read in a book: <quote> With a binary-mode stream, you can't detect the end-of-file by looking for EOF, because a byte of data from a binary stream could have that value, which would result in premature end of input. Instead, you can use the library function feof(), which can be used for both binary- and text-mode files: int...
1
2588
by: Michael | last post by:
I have a solution for this, but it feels wrong. If anyone could offer a better one, I'm all ears. (Or technically, eyes.) Basically, I have a bunch of classes. For concreteness, one is a Matrix class, but that's only one example, so please don't get too hung up on it. I need to output and input these classes. I'd like a nice, pretty,...
0
7918
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...
0
8206
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. ...
0
8340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7967
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...
0
8220
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...
1
5713
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...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3875
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.