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 3 of 3

Thread: Opening a File

  1. #1
    New Coder
    Join Date
    Dec 2004
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Opening a File

    This seems like it ought to be really simple but I can't find it anywhere. I just want to be able to open a simple text file and write its contents to the document. I would also like to pass the filename to a JavaScript function.

    function DescriptionPopUp(FileName)
    {
    DescriptionWindow= window.open ("",
    "DescriptionWindow","status=1,width=350,height=150");
    DescriptionWindow.document.write('<html><head><title>Popup</title>');
    DescriptionWindow.document.write('<link rel="stylesheet" type="text/css" href="../html/VolFormStyles.css" />');
    DescriptionWindow.document.write('</head><body><P></BR></P>');

    DescriptionWindow.document.write(>>contents of text file here<<);

    DescriptionWidnow.documet.write('<P></BR></P><P></BR></P></BODY></HTML>');
    }

    Can anyone point me in the right direction?

    Thanks.

  • #2
    Regular Coder
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    375
    Thanks
    0
    Thanked 0 Times in 0 Posts

  • #3
    New Coder
    Join Date
    Dec 2004
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks!


  •  

    Posting Permissions

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