Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Help needed for non-Javascript programmer!

Reply
Thread Tools

Help needed for non-Javascript programmer!

 
 
John Grogan
Guest
Posts: n/a
 
      10-02-2003
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!
 
Reply With Quote
 
 
 
 
kaeli
Guest
Posts: n/a
 
      10-02-2003
In article <(E-Mail Removed) >,
http://www.velocityreviews.com/forums/(E-Mail Removed) 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
-------------------------------------------------
 
Reply With Quote
 
 
 
 
Horace A. Vallas, Jr.
Guest
Posts: n/a
 
      10-02-2003

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 (E-Mail Removed)
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
================================================== ==============

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Help Help Pentax S5i Help needed (Please) The Martian Digital Photography 14 06-20-2008 07:56 AM
Help Help Help Please Pentax S5i info needed The Martian Digital Photography 2 05-20-2008 07:00 AM
Help needed on this 857W config. Repost to be clearer what the problemsare and the help needed sparticle Cisco 3 08-30-2007 07:47 PM
Ideas needed & help needed! Ryan Macy Ruby 2 07-19-2006 08:04 PM
Microsoft small business server 2003 - help needed to understand what is needed to use it Dima Computer Support 5 10-20-2004 08:27 PM



Advertisments