Help needed for non-Javascript programmer!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Grogan

    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_Settin gs")

    or

    form_data.save( "EID_Settin gs")

    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_sett ings.xml) rather than use
    the cache?

    Any help greatly appreciated!
  • kaeli

    #2
    Re: Help needed for non-Javascript programmer!

    In article <70198bd0.03100 20111.5467ee00@ posting.google. com>,
    johntgrogan@hot mail.com enlightened us with...[color=blue]
    >
    > Is there a way I can force the script to read and write from a
    > specifically named file (e.g. c:\app\eid_sett ings.xml) rather than use
    > the cache?
    >[/color]

    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.


    -------------------------------------------------

    Comment

    • Horace A. Vallas, Jr.

      #3
      Re: Help needed for non-Javascript programmer!


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

      The MDN Web Docs site provides information about Open Web technologies including HTML, CSS, and APIs for both Web sites and progressive web apps.



      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...



      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:[color=blue]
      > 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_Settin gs")
      >
      > or
      >
      > form_data.save( "EID_Settin gs")
      >
      > 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_sett ings.xml) rather than use
      > the cache?
      >
      > Any help greatly appreciated![/color]

      --
      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 hav@hav.com
      Richmond, Tx. 77406-0354 voice: 281-341-5035
      USA fax: 281-341-5087

      Thawte Web Of Trust Notary in SW Houston, Tx.
      Just a splash page to let folks know that I've retired and that hav.Software is, effectively, closed for business - however, past clients and customers are welcome to contact me. If you're interested in buying either the hav.com or pgp.org domain names, please submit an offer in writing.

      =============== =============== =============== =============== ====
      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
      =============== =============== =============== =============== ====

      Comment

      Working...