hi all.
I have a script that tries to open a file that is on a different folder than
the one in which i am working.
that is the script:
openmydoc= "file://///192.168.1.1/web/" + type+ "/" + year+ "/" + Month+
"/myfile.xyz" ;
open(openmydoc) ;
the proble is that on the javascript console i have a message that alerts me
about a security error.
it says "content at http://192.168.1.1/myfldr/mydoc.htm may not load or link
to file:///// 192.168.1.1/web/..."
but if I try to open my link writing by hand the address
file://///192.168.1.1/web/... it works.
the server is apache.
any idea about how to handle this?
tia. 5 2163
ilKaos wrote: hi all. I have a script that tries to open a file that is on a different folder than the one in which i am working. that is the script:
openmydoc= "file://///192.168.1.1/web/" + type+ "/" + year+ "/" + Month+ "/myfile.xyz" ; open(openmydoc) ;
the proble is that on the javascript console i have a message that alerts me about a security error. it says "content at http://192.168.1.1/myfldr/mydoc.htm may not load or link to file:///// 192.168.1.1/web/..." but if I try to open my link writing by hand the address file://///192.168.1.1/web/... it works. the server is apache. any idea about how to handle this? tia.
Hi,
The first argument for window.open (url, target, etc.etc..)
is url.
A URL starts with http://
NOT with file://
You feed something different. (a file on a share somewhere)
What do you expect Javascript to do excactly?
(Javascript cannot open files on a filesystem.)
If the file://///192.168.1.1/web/etcetc is also reachable via http, I
suggest you use that route.
SO if the content of your share is also reachable via a webserver, figure
out the URL, and use that.
Regards,
Erwin Moller
> Hi,
first of all, thanks for your kind answer.
The first argument for window.open (url, target, etc.etc..) is url.
A URL starts with http:// NOT with file://
i thought it could work even with file...my mistake.
You feed something different. (a file on a share somewhere) What do you expect Javascript to do excactly? (Javascript cannot open files on a filesystem.)
that (of course) is just what i need... If the file://///192.168.1.1/web/etcetc is also reachable via http, I suggest you use that route.
SO if the content of your share is also reachable via a webserver, figure out the URL, and use that.
Regards, Erwin Moller
you mean by having somethnig like http://192.168.1.1/web/etc/mtyfile.xyz?
it works, but the problem is that it does not open the file with the
appropriate plugin but rather tries to
open it with the browser itself. this does not happen if i refer to the file
with file://///192.168...
maybe i should specify something at the "apache level" to make the browser
capable of understanding to open
the file with the appropriate plugin? something like mim type
xyz/use_my_plugin ?
thanks again.
ilKaos wrote: Hi,
first of all, thanks for your kind answer.
You are welcome. :-) The first argument for window.open (url, target, etc.etc..) is url.
A URL starts with http:// NOT with file:// i thought it could work even with file...my mistake.
The fact that a browser (sometimes) opens a file for you (when you point to
it by just typing the location into the URL) probably mislead you in
thinking that that is a normal procedure.
(But it is not) You feed something different. (a file on a share somewhere) What do you expect Javascript to do excactly? (Javascript cannot open files on a filesystem.) that (of course) is just what i need...
If the file://///192.168.1.1/web/etcetc is also reachable via http, I suggest you use that route.
SO if the content of your share is also reachable via a webserver, figure out the URL, and use that.
Regards, Erwin Moller
you mean by having somethnig like http://192.168.1.1/web/etc/mtyfile.xyz?
yes.
it works, but the problem is that it does not open the file with the appropriate plugin but rather tries to open it with the browser itself. this does not happen if i refer to the file with file://///192.168...
maybe i should specify something at the "apache level" to make the browser capable of understanding to open the file with the appropriate plugin? something like mim type xyz/use_my_plugin ?
I don't think you have to fiddle with apache to get it done.
But I am not sure what file you are trying to load.
Try this:
1) figure out the URL http://192etcetc to the file you need in Javascript.
2) Try to feed that URL to the object/embed you are using on your page.
A simple example with an image (based on some var named month):
var myImageLocation = "http://192.168.1.1/web/"+month+"/serverload.gif" ;
document.images["servloadim age"].src=myImageLoc ation;
And somewhere in you document:
<img src="default.gi f" name="servloadi mage">
Try to do the same with the object/embed you are using.
If you don't know the excact syntax, google for it.
(Tip: ALso try google groups to search all the newsgroupsposti ngs in the
past)
Good luck!
Regards,
Erwin Moller thanks again. Try to do the same with the object/embed you are using. If you don't know the excact syntax, google for it. (Tip: ALso try google groups to search all the newsgroupsposti ngs in the past)
Good luck!
Regards, Erwin Moller
again, thanks a lot for your kind answer.
i will try what you suggest as soon as possible.
as you probably understood i am not deep in javascript but just using it
in some of the web pages that i am creating with cgi and iseries(as400).
the file that i need to open is an .afp (ibm print format), there is a
plugin that seem to
work only with Ie (and with the conditions i explained in the above
messages).
i am new to js but not so newbie not to try a research with google groups (i
wrote in usenet
since '96 and used deja/google groups since then).
but the problem is that not so many people seem to open afp files from a
web page, or at least they
do not seem to use the web/usenet to help poor guy like me...
hope that your suggestion will work and in any case they were important for
me to
understand some of the js concepts.
thanks and "ciao".
In article <34************ *@individual.ne t>,
"ilkaos" <12********@kat amail.it> wrote: the file that i need to open is an .afp (ibm print format), there is a plugin that seem to work only with Ie (and with the conditions i explained in the above messages).
My understanding is this:
1) you put in a link to your file <a> </a> tag. It's just like a link to
a web page except the name is different.
2) web server serves up file with the correct mime type
3) browser gets the returning file.
4) Browser decides what to do. If there is a plug in for the file, the
plug in get control. If plug in isn't there, browser decides what to do.
Robert This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ger |
last post by:
Hi,
I have a problem with a Windows Service that I have created accessing
System.Management.dll on a W2k3 environment. The Service runs fine on
an XP machine but the same Service causes an error once it tries to
access System.Management.Dll. The service is run using a Domain Admin
acoount.
The code is trying to set permissions for a file and looks like this:
|
by: KKramsch |
last post by:
My code is generating this type of error:
Security Error: Content at http://nonexistent.org/somepage.html
may not load data from about:blank.
The "about:blank" page mentioned in the error message is a pop-up
window, whose content is 100% dynamically-generated, and which is
in fact *owes its existence* to code in the referring page
(nonexistent.org/somepage.html), along the lines of something like
|
by: Nathan Bloom |
last post by:
Hi,
I have a secured database that runs fine on the computer the database is
installed on. I have several workstations with access runtime installed
that also need access to the database. Access runtime runs fine when
accessing an unsecured version of the database. However once the database
was secured it generates a runtime error after asking for the user and
password and won't open. The shortcut to the secured database is:
"path...
|
by: Dave |
last post by:
I am getting te following error in a ASP.Net app that is running on Win XP
Pro (SP2):
Server cannot access application directory 'C:\Documents and
Settings\dave\My Documents\My Visual Studio ASP.NET\MyWebSite\'. The
directory does not exist or is not accessible because of security settings.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information...
|
by: fripper |
last post by:
I am having trouble accessing a datafile in m inetpub/wwwroot/_private
directory from a VB .Net app that I am debugging. When I run the program I
get an error saying that ASP.NET is not authorized to use the file. When I
right-click the file in question and select the Security tab ASP.NET is not
listed under User Names ... but Internet Guest Account and Launch IIS
Process Account are listed . I am running
iis 5.1 and have installed .Net...
| |
by: Richard MSL |
last post by:
I am having problems working with .net security. I have been attempting to
use the Microsoft .Net Framework 2.0 Configuration tool (version
2.0.50727.42), but it won't work for me. I have a simple test application
that works, when I run to Manage Applications - View Assembly Dependencies, I
get an error that says:
Unfortunately, the .NET Framework Configuration tool cannot show this list
of assembly dependencies for this application due...
|
by: Asaf |
last post by:
Hello,
I have created a web service name "TestWS" and published it to my SBS2003
server that uses IIS6 as a web server.
I have set NO anonymous access to TestWS virtual directory and I have
created a simple user account from the User template with the name of
"MyUser".
Problem is that I can't login to \TestWS\Service1.asmx with MyUser account
unless I give that user Administrator permission.
|
by: ajl |
last post by:
I am getting following error on accessing a asp.net application from virtual directory /website.
Please suggest me the solution.
Server Error in '/website' Application.
--------------------------------------------------------------------------------
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact...
|
by: sunoj |
last post by:
Hello friends.....!
I developed a windows application using VB.Net. and Installed it on D Drive of my server Machine. The D Drive is mapped as G on all other machines. When I am working with the application from the server itself it working Properly. When I am Accessing the application from other machines it shows an error as follows. Name of my application is HAMACHI, The EXE filename is HamahiLog and the Back End is...
|
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 usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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,...
|
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...
|
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...
|
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 into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |