...

View Full Version : Using Javascript to change .html document



deadseasquirrel
11-04-2004, 03:24 AM
I am creating an .html document that is designed to be used in an intranet. Because our intranet is pretty simple, really just a file server, all the information needs to be sitting in the .html document. Meaning I have an XML data island in there holding the data, the css is embedded, and the javascript is embedded (no linking anywhere). I was wondering if it was possible to create a script within that page that would allow me to change the actual XML data island in that .html page. That is I would like to be able to create a javascript function that would actually changing the xml within the .html document. My guess is no, but does anybody know if that is possible? Thanks.

Roy Sinclair
11-04-2004, 06:00 PM
Just accessing web pages via the file system doesn't force you to place everything into a single file, simple relative links will still work just fine in that environment. You'd be much better off with the XML data in it's own separate file for a start.

deadseasquirrel
11-06-2004, 04:09 AM
This intranet page is sitting in a CMS for an internal website so it's not really possible to have a reference to another file from my page that is why I dumped everything onto one page.

fci
11-06-2004, 04:20 AM
JS is client-side. look up php or some other server-side language.

joh6nn
11-06-2004, 05:28 AM
because this is an intra-net, this is a definite maybe. i'm assuming this is a fairly standard Win2K network?

assuming that's the case, if you switched that to a .hta file instead of .htm, using the Windows Scripting Host, you MIGHT be able to make those changes. you'd have to connect to the server, and modify the page there. your potential problems are the following:

connecting to the server. i'm pretty sure that can be done, but i've never tried, so i can't give you any help there.
accessing the CMS; whether this can be done probably depends on which one you're using, so again, i can't help you there.
file locking; i don't know if an open .hta file will be able to open itself.

the last one is your brick wall. if you can get over that one, you can most likely pull this off, but i'm not confident you can get over it. if you do pull it off, ask for a raise; i expect it will be a pain in your butt.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum