Help needed for non-Javascript programmer!

Discussion in 'Javascript' started by John Grogan, Oct 2, 2003.

  1. John Grogan

    John Grogan Guest

    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!
     
    John Grogan, Oct 2, 2003
    #1
    1. Advertising

  2. John Grogan

    kaeli Guest

    In article <>,
    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
    -------------------------------------------------
     
    kaeli, Oct 2, 2003
    #2
    1. Advertising

  3. 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/security/components/signed-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
    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
    ================================================================
     
    Horace A. Vallas, Jr., Oct 2, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sanny
    Replies:
    391
    Views:
    41,637
    anish.mathew84
    Jan 6, 2010
  2. Sanny
    Replies:
    396
    Views:
    7,080
    Noah Roberts
    Dec 17, 2008
  3. Isaac
    Replies:
    0
    Views:
    389
    Isaac
    Dec 8, 2010
  4. Isaac
    Replies:
    0
    Views:
    367
    Isaac
    Dec 8, 2010
  5. Javascript Programmer Needed

    , Nov 23, 2006, in forum: Javascript
    Replies:
    16
    Views:
    131
Loading...

Share This Page