473,671 Members | 2,209 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Strange Window.Open problem

I have inherited an intranet ASP.NET (C#) page running on
Windows 2000.

The page populates a label control with some javascript
to open a pop-up to a document (xls, doc, pdf, etc.).
This is what is output onto the page:

<span id="javascriptL abel">
<script language="javas cript">
<!--
window.open("./SomeFolder/SomeDocument.do c");
//-->
</script>
</span>

If the user has javascript turned off there is also a
link provided.

Here's the problem:

The window.open has begun not allowing the document to
open. The File Download diaglogue initially appears then
the message "Cannot open {pathnamehere}. " appears. The
odd thing is ... if you click the standard direct link it
opens no problem.

Another odd thing is when you open a brand new window and
type in the address manually it gives the same "Cannot
open" error.

I initially thought someone had mucked with permissions
but then why would it allow them to access it via direct
link.
Nov 18 '05 #1
1 1242
Hi Melissa,

have you tried this ?
window.open("~/PathToSomeFolde r/SomeFolder/SomeDocument.do c"); this will open the document at the current directory structure in your
virtual root.

http://localhost/MyVirtualDir/PathTo...meDocument.doc

HTH
Regards
Ashish M Bhonkiya

"Melissa" <an*******@disc ussions.microso ft.com> wrote in message
news:e3******** *************** *****@phx.gbl.. . I have inherited an intranet ASP.NET (C#) page running on
Windows 2000.

The page populates a label control with some javascript
to open a pop-up to a document (xls, doc, pdf, etc.).
This is what is output onto the page:

<span id="javascriptL abel">
<script language="javas cript">
<!--
window.open("./SomeFolder/SomeDocument.do c");
//-->
</script>
</span>

If the user has javascript turned off there is also a
link provided.

Here's the problem:

The window.open has begun not allowing the document to
open. The File Download diaglogue initially appears then
the message "Cannot open {pathnamehere}. " appears. The
odd thing is ... if you click the standard direct link it
opens no problem.

Another odd thing is when you open a brand new window and
type in the address manually it gives the same "Cannot
open" error.

I initially thought someone had mucked with permissions
but then why would it allow them to access it via direct
link.

Nov 18 '05 #2

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

Similar topics

9
1490
by: Abby Lee | last post by:
http://www.ncsa.uiuc.edu/Divisions/Admin/reimb.asp There is just too much code to place here. onChange you trigger a function to add the numbers in the the column you entered an amount in (scripts have been made for only the first 2 columns). The information is passed to a second function that adds all the numbers in the row you are in and puts a total at the end. This part works great unless you place an "8", "88", "888", etc. in the...
2
1741
by: Joseph Macari | last post by:
I recently installed Office2003 on my computer. I had imported (not linked) a couple of tables from an Access 2000mdb into an Access 2003mdb. I had composed various queries and forms with these imported tables...saved the 2003mdb numerous times without incident. I was working on a form with this imported data (not linked) and all of a sudden the data just disapeared (??)....i.e., the data in the two tables was empty!!! No problem;...
4
1608
by: Gav | last post by:
Hi all, I'm having this strange problem where, in a web app, I have 2 different links to a different form. One is just a straight forward link the other is a bit more complicated because it gets there from a user control I wrote to display a menu. However both call the page in the same way using window.open('page.aspx','_top'); The problem is that:.... The page it calls, in the page load, checks to see if a session variable is null,...
6
1802
by: chau_fai | last post by:
I have a window Form called "Form2". There is only one button and a panel returned from a static method of the "Coord" in this form. In the panel returned, there is a button that can choose image from "OpenFileDialog" and then display it in a picturebox. This actually works properly before the button1 is clicked. Button1 is a button to open a new form and again it gets a panel returned from the static method inside "Coord" and perform the...
1
1485
by: Shrishail Rana | last post by:
Hello all, Here's another mind puzzle from me :-) Today I tried to add a new resource to my program and VS.NET (v 7.0.9466) just died. What I mean by that is that it silently and quickly (immediately actually) closed its window. No errors, no access faults - nothing. Just died. I restarted it, tried to add a resource again and it repeated itself. I rebooted the computer (which I haven't done in a few weeks now), but it doesn't help...
2
1064
by: Daniel | last post by:
Hello Everyone, I am using VS 2002 (VB.NET) and have a MDI application in which the user will open several child windows at the same time. I have included a menu Window, which MDIList property is set to True. I also have all the traditional menus included in it (Tile Horizontal, Vertical, Cascade, Arrange and Close All). The strange thing is that when the child windows are open in normal window state everything is OK, but if I set the...
5
3104
by: Ian | last post by:
Hi everyone, I have found some bizarre (to me...!) behaviour of the Form_Activate function. I have a form which has a button control used to close the form and a subform with a datasheet view showing a list of jobs from the database. When the main form loses focus and the user clicks the 'Close' button, I kept receiving error 2585 (This action cannot be carried out whilst processing a form or report event). This was tracked down to...
3
1516
by: t_rectenwald | last post by:
I've noticed an oddity when running a program, using the csv module, within IDLE. I'm new to Python so am confused by what is happening. Here is what I'm doing: 1) Open the IDLE Shell. 2) Select File | Open... 3) Choose my file, foo.py, opening it in a window. 4) From that window, I hit F5 to run the module. Within the program, the snippet where I use the csv module is below:
0
8914
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
8598
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
8670
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
7433
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
6223
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...
0
4224
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2810
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
2051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1809
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.