473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Help needed for non-Javascript programmer!

I have absolutely no experience in Javascript although am a programmer by
trade.

I have a problem in a third-party system, as follows.

The system uses "web" forms to capture and save data. When the form
is called up it should "remember" some field contents from previous
sessions. It works intermittently, other times produces "error on
page" errors. I have narrowed it down to some lines in a Javascript
script that is called when opening the form and closing (saving the
data). The line is :-

form_data.load("EID_Settings")

or

form_data.save("EID_Settings")

I believe it is trying to load from an XML file. The problems seem to
be related to permissions on Windows XP. The XML file is saved to the
cache of the first user to run the system, therefore other users can't
access it. I have tried moving the cache for all users to a central
location - still doesn't work (I get a message about the "Internet
extensions").

Is there a way I can force the script to read and write from a
specifically named file (e.g. c:\app\eid_settings.xml) rather than use
the cache?

Any help greatly appreciated!
Jul 20 '05 #1
2 1644
In article <70**************************@posting.google.com >,
jo*********@hotmail.com enlightened us with...

Is there a way I can force the script to read and write from a
specifically named file (e.g. c:\app\eid_settings.xml) rather than use
the cache?


No, javascript has no such permissions normally. You'd need special
permissions to write to a user's hard drive with signed scripts.
Actually, I know applets can do it, but I'm not sure JS can at all. Too
many malicious people would take advantage of such a thing.

You should never count on the cache. Users often empty it. Some of us
have it set to 0 so nothing ever caches.

Use cookies or session variables (often in conjunction with a DB table)
to save user settings.

-------------------------------------------------
~kaeli~
All I ask for is the chance to prove that money
cannot make me happy.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
-------------------------------------------------
Jul 20 '05 #2

if it's a script permission problem that requires signing the code for
additional privilege, you can find info for Mozilla/netscape at...

http://www.mozilla.org/projects/secu...d-scripts.html
http://docs.sun.com/source/816-6164-10/signscpt.htm

will probably need another approach for IE users (at least java requires
different signing for the netscape, IE (and the plugin though the plugin
can use .jar's signed for netscape)

some IE info for applet signing is at...

http://www.suitable.com/docs/signingsignexp.html

or just goggle for how to sign applets and/or javascript

can probably jar and cab the script and sign like applets, then include the
signed script wih src="whatever"... where whatever is the appropriately
signed jar (or cab) As a note, IE can use .jar's but not signed .jar's
(at least, for applets)

John Grogan wrote:
I have absolutely no experience in Javascript although am a programmer by
trade.

I have a problem in a third-party system, as follows.

The system uses "web" forms to capture and save data. When the form
is called up it should "remember" some field contents from previous
sessions. It works intermittently, other times produces "error on
page" errors. I have narrowed it down to some lines in a Javascript
script that is called when opening the form and closing (saving the
data). The line is :-

form_data.load("EID_Settings")

or

form_data.save("EID_Settings")

I believe it is trying to load from an XML file. The problems seem to
be related to permissions on Windows XP. The XML file is saved to the
cache of the first user to run the system, therefore other users can't
access it. I have tried moving the cache for all users to a central
location - still doesn't work (I get a message about the "Internet
extensions").

Is there a way I can force the script to read and write from a
specifically named file (e.g. c:\app\eid_settings.xml) rather than use
the cache?

Any help greatly appreciated!


--
Horace ...once known as "Kicker" :-)
================================================== ==============
....drop by and chat if I'm online http://www.hav.com/chat/
================================================== ==============
Horace Vallas hav.Software http://www.hav.com/
P.O. Box 354 ha*@hav.com
Richmond, Tx. 77406-0354 voice: 281-341-5035
USA fax: 281-341-5087

Thawte Web Of Trust Notary in SW Houston, Tx.
http://www.hav.com/?content=/thawteWOTnotary.htm
================================================== ==============
What is a Vet? ... He is the barroom loudmouth, dumber than five
wooden planks, whose overgrown frat-boy behavior is outweighed a
hundred times in the cosmic scales by four hours of exquisite
bravery near the 38th parallel. ... - Unknown
================================================== ==============

Jul 20 '05 #3

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

Similar topics

12
by: windandwaves | last post by:
Hi Folks I have just completed a project for an accommodation finder in New Zealand - much with your help - thank you again. I would appreciate any constructive or deconstructive comments. ...
3
by: KK | last post by:
Hi, im working on this bigInt class. Need help writing algorithm for the operator*, andy help will be appreciated. Thanks in advance bigInt.h...
9
by: netpurpose | last post by:
I need to extract data from this table to find the lowest prices of each product as of today. The product will be listed/grouped by the name only, discarding the product code - I use...
1
by: Hafeez | last post by:
I am having real trouble compiling this code http://www.cs.wisc.edu/~vganti/birchcode/codeHier/AttrProj.tgz The attachment shows errors when compiled using the current version of g++ in a...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
9
by: B Vidyadhar Joshi | last post by:
I have converted a few C++ structures to C# structures. However, when I use them in the code, I get errors in "internal static BluetoothDeviceInfo Create()". I feel I'm doing something wrong while...
0
by: batista | last post by:
Hello all, I am using a webpage having a grid and im calling a webservice method(using webservice.htc) which after 5 seconds updates the content of the grid, uptil now everything is working...
25
by: muttaa | last post by:
i'm sorry for posting an incomplete code. here's the full listing................. #include<stdio.h> #include<conio.h>
5
by: raylopez99 | last post by:
I need an example of a managed overloaded assignment operator for a reference class, so I can equate two classes A1 and A2, say called ARefClass, in this manner: A1=A2;. For some strange reason...
12
by: Kira Yamato | last post by:
I've posted this in another thread, but I suppose I should've started a new thread for it instead. I cannot get the following short program to compile under g++: #include <iostream> #include...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
jinu1996
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...
0
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...

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.