Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Feb 2004
    Posts
    192
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Using Javascript to change .html document

    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.

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #3
    Regular Coder
    Join Date
    Feb 2004
    Posts
    192
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #4
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    JS is client-side. look up php or some other server-side language.
    Last edited by fci; 11-06-2004 at 04:22 AM.

  • #5
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72° W. 48' 57" , 41° N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    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.
    Last edited by joh6nn; 11-06-2004 at 06:06 AM.
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •