SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Member
    Join Date
    Dec 2001
    Location
    Boston, MA
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    applying javascript to automatically generated .txt files?

    Please, I need some direction. I would appreciate any help...and sorry if this is confusing...
    I am developing an intranet site - one thing my boss needs me to do is create a link from the site i'm developing to .txt reports from another site that resides on another server. These .txt reports are generated daily, I'm guessing by ASP (I don't have access to any info about the 2nd site unfortunately). Right clicking needs to be disabled in the .txt files to prevent printing, copying, etc. I have an external .js script that does this but how do I automatically include this .js file in each .txt file while they are being generated? Would the include script just go into the ASP somewhere? Thank you very much!

  2. #2
    \m/ R.I.P. Dimebag! \m/ JimBolla's Avatar
    Join Date
    Dec 2001
    Location
    erie, pa
    Posts
    1,130
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    first off, being that they are .txt files and not .html files, any browser will not recognize any script commands in the file. the only option would be to convert them into html docments.

    secondly, "disabling" the right click feature (which doesn't work in all browsers anyways) is not a surefire method of copy protection. just becuse the user can't right-click and choose print/copy doesn't mean he can't go to the file menu and choose print or use keyboard shortcuts to select all and copy.

    preventing them from copying is somewhat possible if you display the text via a java applet of flash object embedded into the page. although this is still susceptible to printing issues. but thats about as close as you're gonna get to protecting your document from being copied.

    there's usually a way to deter the casual user from copying your content, but the bottom line is that if you allow someone to SEE a piece of information, you're allowing them to KEEP that piece of information.


    ps: i think this is the wrong forum for this thread

  3. #3
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I couldn't quite understand,

    I would reccommend downloading this

    http://msdn.microsoft.com/theshow/Archive.asp. Theres a video i think #22, which tells you how to use asp.net and connect between two servers etc.

    you cannot include .js files in .txt files. Make your own program or applet to get people to read the files.

  4. #4
    pg for mild peril cow's Avatar
    Join Date
    Mar 2000
    Location
    nevada, usa
    Posts
    636
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you're also going to have a hard time protecting the contents of the txt files from being printed. plain text in a browser can just be copied and printed through notepad.
    "There's no justice like angry mob justice!" --Seymour Skinner

  5. #5
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    - Matt ** Ignore old signature for now... **
    Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
    "Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR

  6. #6
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have merged the two threads. PLEASE DO NOT POST DUPLICATES in future. It only causes confusion and WILL NOT get you a better answer.
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  7. #7
    SitePoint Member
    Join Date
    Dec 2001
    Location
    Boston, MA
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I apologize. Someone mentioned above that this was the wrong forum for this thread so I tried to move it. Thanks for all the input.
    So, I have to change the .txt files to html to use the .js include. I can do this through ASP...am I wrong? I just found out that the site uses Oracle/Rdb and the OpenVMS operating system. Does anyone know if I can use ASP with this? Thanks again for all your help!

    Also, I know there is no way to completely prevent people from copying, printing, etc. but I'm trying to slow them down a little. The employees where I work are basic users...if that. Thanks.
    Last edited by grbrren; May 7, 2002 at 07:05.

  8. #8
    \m/ R.I.P. Dimebag! \m/ JimBolla's Avatar
    Join Date
    Dec 2001
    Location
    erie, pa
    Posts
    1,130
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    being that its for an intranet site, i'm curious as to why you'd want to prevent them from copy/pasting. but if you must, i'd go with the java applet to render the content inside the applet. or if you had ASP.NET you could render it as a really big image, that would be fun

  9. #9
    SitePoint Member
    Join Date
    Dec 2001
    Location
    Boston, MA
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I work in a House of Correction and one of our policies is to disallow any reproduction of info. from the Inmate Tracking System. They can still take a screenshot or use key commands but, like I said, most of the employees here barely know how to turn on their computers. I'm just trying to deter them by disabling right-clicking and getting rid of the browser menus.


Bookmarks

Posting Permissions

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