how to load client-side xml file?

Discussion in 'Javascript' started by memiller@westernsurety.com, Oct 13, 2008.

  1. Guest

    I know this generally not recommended, but I'm working in the confines
    of the company's intranet.

    Goal: permit managers to load an XML file from thier PC into an
    intranet ASP.NET webpage where validation and data submit will take
    place. I have the page written that allows the user to select a
    file. I'm hitting a wall when, after selecting the file, trying to
    open a new page and inserting the XML into the page. From there I can
    start validating the data. I've been tried to using
    Response.BinaryWrite but it appears that will only work with server-
    side files. I also haven't had much luck in trying to open the file
    with Javascript. Any suggestions?
     
    , Oct 13, 2008
    #1
    1. Advertising

  2. David Mark Guest

    On Oct 13, 5:42 pm, ""
    <> wrote:
    > I know this generally not recommended, but I'm working in the confines
    > of the company's intranet.


    That would depend on the company and Intranet.

    >
    > Goal: permit managers to load an XML file from thier PC into an
    > intranet ASP.NET webpage where validation and data submit will take


    ASP.NET is OT here.

    > place.  I have the page written that allows the user to select a
    > file.  I'm hitting a wall when, after selecting the file, trying to
    > open a new page and inserting the XML into the page.  From there I can
    > start validating the data.  I've been tried to using
    > Response.BinaryWrite but it appears that will only work with server-
    > side files.  I also haven't had much luck in trying to open the file
    > with Javascript.  Any suggestions?


    Post some (if not all) of the suspect (client side) code?
     
    David Mark, Oct 13, 2008
    #2
    1. Advertising

  3. Laser Lips Guest

    On Oct 13, 10:50 pm, David Mark <> wrote:
    > On Oct 13, 5:42 pm, ""
    >
    > <> wrote:
    > > I know this generally not recommended, but I'm working in the confines
    > > of the company's intranet.

    >
    > That would depend on the company and Intranet.
    >
    >
    >
    > > Goal: permit managers to load an XML file from thier PC into an
    > > intranet ASP.NET webpage where validation and data submit will take

    >
    > ASP.NET is OT here.
    >
    > > place.  I have the page written that allows the user to select a
    > > file.  I'm hitting a wall when, after selecting the file, trying to
    > > open a new page and inserting the XML into the page.  From there I can
    > > start validating the data.  I've been tried to using
    > > Response.BinaryWrite but it appears that will only work with server-
    > > side files.  I also haven't had much luck in trying to open the file
    > > with Javascript.  Any suggestions?

    >
    > Post some (if not all) of the suspect (client side) code?


    You don't / CANT open files with javascript...You use the browser to
    do that. You can't let javascript handle an XML file until it's on a
    server somewhere. Then you can easily play with the file in
    JavaScript. But that's all you can do with it. You can't CHANGE the
    file with JavaScript or save it to another file. JavaScript sits in a
    browser and is limited to it's sandbox. Go and read what JavaScript
    Is!
     
    Laser Lips, Oct 14, 2008
    #3
  4. Evertjan. Guest

    Laser Lips wrote on 14 okt 2008 in comp.lang.javascript:

    > You don't / CANT open files with javascript...You use the browser to
    > do that. You can't let javascript handle an XML file until it's on a
    > server somewhere. Then you can easily play with the file in
    > JavaScript. But that's all you can do with it. You can't CHANGE the
    > file with JavaScript or save it to another file. JavaScript sits in a
    > browser and is limited to it's sandbox. Go and read what JavaScript
    > Is!
    >


    Javascript can be used by Wscript or Cscript and on the server under ASP.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Oct 14, 2008
    #4
  5. dhtml Guest

    Tim Williams wrote:
    > "Evertjan." <> wrote in message
    > news:Xns9B37E0FA5543Ceejj99@194.109.133.242...
    >> Laser Lips wrote on 14 okt 2008 in comp.lang.javascript:
    >>
    >>> You don't / CANT open files with javascript...You use the browser to


    Wrong answer.

    >>>

    >> Javascript can be used by Wscript or Cscript and on the server under ASP.
    >>

    >
    > ...or in an HTA (on Win)
    >


    Or in a web browser, which might actually be able to read the file.

    Garrett

    > Tim
    >
    >



    --
    comp.lang.javascript FAQ <URL: http://jibbering.com/faq/ >
     
    dhtml, Oct 17, 2008
    #5
    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. Fred
    Replies:
    2
    Views:
    1,076
    Craig Deelsnyder
    Jul 12, 2004
  2. =?Utf-8?B?YWRvbGYgZ2FybGlj?=

    How to access client side XML data island from server side?

    =?Utf-8?B?YWRvbGYgZ2FybGlj?=, Nov 23, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,166
    aa7im
    Nov 23, 2004
  3. Boss302
    Replies:
    0
    Views:
    1,057
    Boss302
    Nov 21, 2006
  4. Bogdan
    Replies:
    2
    Views:
    657
    Bogdan
    Jun 9, 2008
  5. Zoe Hart
    Replies:
    1
    Views:
    374
    Scott Wisniewski
    Jan 8, 2004
Loading...

Share This Page