473,805 Members | 2,297 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ini file access

pat
hi all.

am trying to find out how to read/load data from an ini file (and save it
too)

thanx in advance

pat

Jul 20 '05 #1
3 8540
pat wrote on 13 Dec 2003 at Sat, 13 Dec 2003 23:38:32 GMT:
am trying to find out how to read/load data from an ini file
(and save it too)


Certain browsers might be able to read the data into a variable as a
string (I forget how), but they certainly cannot save it again.
JavaScript wasn't developed to do that sort of thing.

Mike

--
Michael Winter
M.******@blueyo nder.co.invalid (replace ".invalid" with ".uk")
Jul 20 '05 #2
> am trying to find out how to read/load data from an ini file (and save it
too)


Only if your .ini file resides on the same domain, you can read it by
javascript in modern browsers. A popular technique is the use of
iframes:

<iframe src="C:\YOUR_IN I_FILE.INI"></iframe>

Saving back is not possible. You 'll need a server process for that.

Bart
Jul 20 '05 #3
Bart Van der Donck wrote:
am trying to find out how to read/load data from an ini file (and save it
too)
Only if your .ini file resides on the same domain, you can read it by
javascript in modern browsers. A popular technique is the use of
iframes:

<iframe src="C:\YOUR_IN I_FILE.INI"></iframe>


<OT>

JFTR:

If you consider `localhost' a domain and you dare call IE a "modern
browser" this might work. Generally, not backslashes serve the purpose
of path delimiters in URIs but forward slashes do. And a URI scheme
identifier is missing, too, Mozilla/5.0 for example will probably not
show anything (at least it will only work on Windows.)

<iframe src="file:///C:/YOUR_INI_FILE.I NI"></iframe>

could work on Windows as well as

<iframe src="YOUR_INI_F ILE.INI"></iframe>

could do everywhere. However, the former will only work if the
parent document is accessed via the local file system or if the UA
is borken/unpatched. AFAIK & IIRC, for Mozilla/5.0 the bug has
been fixed in rv:1.4 (CMIIW), and thus access from `http:' to
`file:' is no longer possible.
Saving back is not possible. You 'll need a server process for that.


Just to clarify: Server processes cannot and will not access the
`iframe' element (since it is rendered client-side), but the
resource it refers to.

</OT>
PointedEars
--
apprentice.c - parses /etc/magic to learn magic

(from the file-3.40 README)
Jul 20 '05 #4

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

Similar topics

18
9121
by: Dino | last post by:
dear all, i've created an application for a customer where the customer can upload ..csv-files into a specified ftp-directory. on the server, a php-script, triggered by a cronjob, reads all the data, imports it into a mySQL database and deletes the .csv-file after the import. so far, so good. but in some cases the cronjobs starts running when the file is not completely
2
3941
by: Fran Tirimo | last post by:
I am developing a small website using ASP scripts to format data retrieved from an Access database. It will run on a Windows 2003 server supporting FrontPage extensions 2002 hosted by the company 1&1 with only limited server configuration via a web based control panel. My query relates to the ASP security model and how it relates to FrontPage options for setting file access on a database file. If you know of any online documentation...
3
2817
by: Joe Costa | last post by:
I have written the following code to search for the right file depending on the startup file for "Client Access". The menu database that I made will load the correct config file specific for each "Thin Client". The problem is that we also use PC's to run the "Client Access" program and under the following script it will create a match and load the wrong WS file. I read that you should not use the DIR function but that's that only way I...
4
47547
by: Bill | last post by:
I need help closing a CMD window when it is executed from Access. 1) The batch file is called from Access. 2) Access closes, 3) the batch runs a copy of the access database (creating a backup) 4) Once the copy is complete, the batch file opens the Access database again 5) EXIT should close out the cmd window but it does not execute that line
1
2534
by: raydelex | last post by:
I am new to securing a database with logins. My questions is: I want only one database to use a new Workgroup file that I have created, not all the Access databases that I bring up under my system login. Can this be done? Thanks
11
9605
by: sur | last post by:
Hello, My problem is that File.Exists works fine if my file is on my local drive but returns false if its on any other drive. I think that the issue is probably file permissions and so I have tried the following: FileIOPermision permFileIO = new FileIOPermission(FileIOPermissionAccess.Read, filepath.Value.ToString());
0
3946
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen. It is almost like it is trying to implement it's own COM interfaces... below is the header, and a link to the dll+code: Zip file with header, example, and DLL:...
13
11161
by: George | last post by:
Hi, I am re-writing part of my application using C#. This application starts another process which execute a "legacy" program. This legacy program writes to a log file and before it ends, it writes a specific string to the log file. My original program (MKS Toolkit shell program) which keeps running "grep" checking the "exit string" on the "log files". There are no file sharing problem.
16
2415
by: Eran.Yasso | last post by:
Hi, I have a mdb file shared in the LAN. I want to write app that verifies if it's open. If the file is not open, then my app can open the file. if the file is used, then the app won't open it. I also want this app to have handle to this file, then when the user stops editting this file, he can close it using this app.
5
17775
by: =?Utf-8?B?QWRyaWFuTW9ycmlz?= | last post by:
Hello! I'm trying to copy a file from another computer on the network that I do not have permission with my current logon details to access. If I open the folder using the Windows file manager with the path "\\ 192.168.2.2\temp" (where temp is a shared directory on server \\192.168.2.2), windows prompts for a User Name and password of a user who has permission on that computer to access that directory. If I enter valid details, the...
0
9718
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10370
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
10109
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...
1
7649
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
6876
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();...
0
5545
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...
0
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4328
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
3849
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.