|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Binary Stream opens in same frame instead of new window
a button that opens the relevant document (Excel, PDF, etc.). The button calls some javascript which basically performs a window open: window.open('document.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.ContentType = "application/x-msword" Case "PDF" Response.ContentType = "application/pdf" Case "XLS", "CSV" Response.ContentType = "application/x-msexcel" end select set objStream = server.CreateObject("ADODB.Stream") objStream.Open objStream.Type = adTypeBinary objStream.LoadFromFile strFile Response.BinaryWrite 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! <axiar***@yahoo.com> wrote in message
Show quote news:1156779206.286974.237550@m73g2000cwd.googlegroups.com... On your machine open Windows Explorer goto tools | folder options and the> 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('document.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.ContentType = "application/x-msword" > Case "PDF" > Response.ContentType = "application/pdf" > Case "XLS", "CSV" > Response.ContentType = "application/x-msexcel" > end select > > set objStream = server.CreateObject("ADODB.Stream") > objStream.Open > objStream.Type = adTypeBinary > objStream.LoadFromFile strFile > > Response.BinaryWrite 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! 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? |
|||||||||||||||||||||||