NetTalk Central

Author Topic: HTML to include a text file  (Read 16051 times)

broche

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Email
HTML to include a text file
« on: May 07, 2014, 12:05:51 PM »
Hi, I know there is a way to include a text file using HTML - That way I can have different text files for different customers show on login?

Brian
Brian

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: HTML to include a text file
« Reply #1 on: May 07, 2014, 09:34:48 PM »
Use the tag;
<!-- Net:f:filename.htm -->
in your login form (maybe as a Display field).

Note that the snippets should contain "xHTML compliant text" for maximum compatibility.

xHTML basically means that all opening tags, must be explicity closed.
eg <br> is not allowed. Use <br></br> or more compactly <br/>

Cheers
Bruce


terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: HTML to include a text file
« Reply #2 on: May 07, 2014, 09:38:35 PM »
Hi Brian
This is pretty clunky and wouldn't be too practical for a large number of clients but should work for a small set.
It would obviously only work after login.
In your PageHeaderTag select actions then the XHtml tab
Insert a routine
Routine: name e.g JJoneslogin
condition: p_web.GSV('logincode') = 98  !represents the unique code for the user
or
condition: p_web.GSV('logincode') = 'JJones'  !represents the user's login name
Location: Top
XHTML:

<!-- Net:f:Client/98.txt --> !contains the html that you want to appear

Repeat for each user
I haven't done any testing but I think this should work. There's probably a better way which should popup in this thread
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

broche

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Email
Re: HTML to include a text file
« Reply #3 on: May 08, 2014, 06:31:25 AM »
Thanks to both of you ...
Brian