NetTalk Central

Author Topic: Xhtml tags in text  (Read 3975 times)

MyBrainIsFull

  • Full Member
  • ***
  • Posts: 134
    • View Profile
Xhtml tags in text
« on: August 19, 2015, 06:28:59 PM »
Hi all,  I am using xhtml to create text at the top of a mem form

My end users want to be able to edit this, so I am putting the text in a tps file as a string, easy and it works.

But when I put tags in the text like <!-- Net:s:Variable -->   I get this returned literally, it is not parsed out - see image.

There must be a procedure somewhere that I can send this string to and get these tags  resolved

   loc:String = p_web.ParseThisPleaseBruce( loc:string )

 T I A

[attachment deleted by admin]
« Last Edit: August 19, 2015, 06:42:27 PM by MyBrainIsFull »

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Xhtml tags in text
« Reply #1 on: August 20, 2015, 08:12:38 AM »
Hi Kevin
Are you saving the tps field value into a SessionVariable before called the Tag?
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

MyBrainIsFull

  • Full Member
  • ***
  • Posts: 134
    • View Profile
Re: Xhtml tags in text
« Reply #2 on: August 20, 2015, 06:01:58 PM »
Hi Terry, I am sending the packet out like this

THIS WORKS OK (a)
packet.append(p_web.AsciiToUTF( ' Your course is <!-- Net:s:Cou:Name --> blah blah blah '&  '',net:OnlyIfUTF,net:StoreAsAscii))   

ie this shows as    "Your course is Woodwork 101"

THIS DOES NOT (b)
packet.append(p_web.AsciiToUTF(  clip(Tok:Content) &  '<13,10>'&  '',net:OnlyIfUTF,net:StoreAsAscii))   
Where tok:content is a text field that holds the same text as in (a)

ie this shows as "Your course is <!-- Net:s:Cou:Name --> "

The plain text in (b) is OK but the  <!-- Net:s:Whatever -->  does not get parsed

Thanks

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Xhtml tags in text
« Reply #3 on: August 20, 2015, 08:04:45 PM »
maybe this?


packet.append(p_web.AsciiToUTF(<39>' &  clip(Tok:Content) &  '<39><13,10>'&  '',net:OnlyIfUTF,net:StoreAsAscii))   

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Xhtml tags in text
« Reply #4 on: August 21, 2015, 12:37:30 AM »
Hi Kevin,

I guess there's only a few ways this can be wrong.
I tried to duplicate your problem in example 3.

a) in WebHandler, ProcessLink, before parent call;
  self.SSV('bruce',format(today(),@d6) & ' ' & format(clock(),@t4))

b) In LoginForm, xHtml tab, "Before <form>", Routine Name : one
<div class="red">
Welcome to Example 3
<!-- Net:s:bruce -->
</div>


If I go to the login screen the session value is there - as you are asking for.

So I guess you're doing something different to this?

cheers
Bruce