By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,527 Members | 1,256 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,527 IT Pros & Developers. It's quick & easy.

Help needed for non-Javascript programmer!

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a

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 discussion thread is closed

Replies have been disabled for this discussion.