read & write

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gsgurdeep
    New Member
    • Apr 2007
    • 94

    #1

    read & write

    Good Morning

    I want to display text of a notepad file on a html page. File is randomly updated any time by an employ. after update html page should be updated autometically.
    tell me the solution.
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    is it a local file at the corresponding client? or is it a serverside file?

    kind regards

    Comment

    • gsgurdeep
      New Member
      • Apr 2007
      • 94

      #3
      Originally posted by gits
      is it a local file at the corresponding client? or is it a serverside file?

      kind regards


      Thanks 4 Attention.
      The File is saved at client side.

      Comment

      • gits
        Recognized Expert Moderator Expert
        • May 2007
        • 5390

        #4
        in that case you need a file-input box:

        [HTML]<input type="file" name="whatever"/>[/HTML]
        to let the user decide which file to load ... since you don't get access to the users filesystem with standard javascript (may in IE ... and only that ... you may use an activeX obj to avoid that step ... but you have to deal with security privileges etc.) ...

        now you could load the txt-file to a hidden iframe and then retrieve its content with dom-methods ... now you have to decide what to do with that retrieved text :)

        kind regards

        Comment

        Working...