Hi,
Can anyone tell me how to use XMLHTTPRequest or MS ActivcXObject open a
local file?
Thanks
Sam 5 9475
I have posted a week, week and a half code for Firefox, getting text
and writing to a local file. Search by my name. There are plenty
examples for IE through google web search.
acord wrote: Hi,
Can anyone tell me how to use XMLHTTPRequest or MS ActivcXObject open a local file?
Thanks Sam
With regard to HTTPRequest (assuming it is running in a browser, and
security settings allow), just set the URI to the local file path, and
then read the text of the file using the responseText property.
With the ActiveXObject, look up the various objects and properties of
Scripting.FileS ystemObject on the msdn website
<URL:http://msdn.microsoft. com>
Regards
Julian Turner
Julian Turner said the following on 3/21/2006 3:22 AM: acord wrote:
Hi,
Can anyone tell me how to use XMLHTTPRequest or MS ActivcXObject open a local file?
Thanks Sam
With regard to HTTPRequest (assuming it is running in a browser, and security settings allow), just set the URI to the local file path, and then read the text of the file using the responseText property.
And then, only if it is running from the local file system. If the page
is on a server, you won't read the file.
--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Well, not true. I can show how you can bypass that in userl.js for YOUR
browser. Other users will not be able to, not without additional
entries to user.js, but for your OWN needs, you can make it read YOUR
files by setting permissions, it will never even prompt you.
Alex said the following on 3/21/2006 9:01 AM:
Please quote what you are replying to.
If you want to post a followup via groups.google.c om, don't use the
"Reply" link at the bottom of the article. Click on "show options" at
the top of the article, then click on the "Reply" at the bottom of the
article headers.
<URL: http://www.safalra.com/special/googlegroupsreply/ > Well, not true.
Yes, it is true.
I can show how you can bypass that in userl.js for YOUR browser.
My IE does not have a userl.js file so that will be hard to show me.
Other users will not be able to, not without additional entries to user.js, but for your OWN needs, you can make it read YOUR files by setting permissions, it will never even prompt you.
If you want to do that, run the file locally and you don't even have to
edit anything.
--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/ This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Brad |
last post by:
I have a win2003 server workstation with multiple webs, each web has it's
own ip address. In VS2005, if I select to open an existing web site, select
Local IIS, the dialog correctly displays a list of all of my webs, however
if I attempt to open a site under and web other than localhost I receive the
message:
"Unable to open the Web 'http://localhost/anywebappname'. The Web
'http://localhost/anywebappname' does not exist"
Obviously...
|
by: vikas.khengare |
last post by:
Hi Friends....
I have AJAX code which giving "Permission denied to call method
XMLHttpRequest.open" error. This error fired by FireFox 1.0 and IE 6
and with Tomacat 5.x.
This code work very correctly on the other machine and giving correct
output also.
I am trying to fetch "html" pages from others server.
|
by: TLaufenberg |
last post by:
I'm new to Javascript programming and I've run into a bit of a snag
with making an XMLHttpRequest in the Safari browser. Actually, the
request doesn't work in Firefox either but only when I use a Mac
computer. IE and FireFox on a Windows based system works just fine. The
problem I am having is that the XMLHttpRequest doesn't open the site
that I've programmed into it. When I check the readyState it only
returns 0 and never goes through the...
|
by: MoshiachNow |
last post by:
HI,
I try to open a link using %windir% in path:
<LI><A HREF="%windir%/temp/MainSetupLog.log">F </A></LI>
The browser does not seem to find the file.
However,If I paste in the Address window:
file:///%windir%/temp/MainSetupLog.log
|
by: Charlie |
last post by:
I am trying to make an XMLHttpRequest which violates the default "same-
origin"policy in Firefox. I checked the archives and found a method
that should work but it does not. Below is the test code I isolated. I
set signed.applets.codebase_principal_support true and seemed to get
the UniversalBrowserRead permission but then the open still failed
with the same old "Permission denied to call method
XMLHttpRequest.open" error. Can someone tell...
| |
by: =?Utf-8?B?UGV0ZXI=?= |
last post by:
Dear,
I do have an ASP page with vbscript code entirely executed on the IIS
server. The page contains a lot of data coming from the SQL Server.
I want to populate one of the <selectboxes on that page with data coming
from a file stored on the clients local hard drive. How do I achieve this?
Thanks in advance,
Regards,
Peter
|
by: max.aginaga |
last post by:
Hi everyone
I've come across the following problem: on two different linux
machines, both running python 2.5 (r25:51908), I have the same file
'd.dat'. The md5 checksums are the same.
Now, on one machine the following code works
while on the other...
|
by: sbettadpur |
last post by:
hello
I am using xmlHttpRequest method in my application, this method is giving problem in the following browsers
1) Internet Explorer 7
2) Mozila Firefox(2.0.0.16)
I got solution for Mozilla issue
let me explain what i did
|
by: robain |
last post by:
I am looking for an isolated piece of code that uses XmlHttpRequest/JavaScript to download files from a (specified path on a) server to local machine. The browser on the local machine (Mozilla/FireFox) does not require user interaction.
|
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: 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 captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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: 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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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
| |