NetTalk Central

Author Topic: New line in loc:alert  (Read 3367 times)

Koen Tjoa

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
    • Email
New line in loc:alert
« on: November 30, 2011, 04:04:23 AM »
I would like to have the message that appears in top of the form dived in two lines. I tried <br /> but that doesn’t work. I guess that is not considered as HTM code but as text somehow. Is there a trick I can make the message appears in two lines?

Cheers,
Koen

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: New line in loc:alert
« Reply #1 on: November 30, 2011, 05:07:12 AM »
Hoi Koen,

I'm not an expert on this but did you give <13,10> a try?

Rene
Rene Simons
NT14.14

Koen Tjoa

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
    • Email
Re: New line in loc:alert
« Reply #2 on: November 30, 2011, 11:53:17 AM »
Hi Rene,

It was worth a try, but it didn’t work.

Probably I need to figure out how I can add xHTML code like ‘<br />’ in loc:alert without it being removed when in the p_web.Message method.

Cheers,
Koen

ccordes

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
    • Email
Re: New line in loc:alert
« Reply #3 on: December 01, 2011, 06:34:12 AM »
message calls the translate, translate takes out html unless asked not to.

Here is what you can do - in the webhandler, Translate, before the parent, put this code -
 if self.gsv('msgHTML') = '1'
   p_AllowHtml =1
end

Then when you call alert, set the session value msgHTML to 1
Maybe in your sendalert embed before calling message - p_web.ssv('msgHTML','1')

!!!IMPORTANT !!! - After calling message reset it! - p_web.ssv('msgHTML','')
otherwise every message will allow HTML and that could be bad.
Real programmers use copy con newapp.exe

Koen Tjoa

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
    • Email
Re: New line in loc:alert
« Reply #4 on: December 02, 2011, 03:29:37 AM »

Hi Ccordes,

Thanks, that did the trick.  :)

Cheers,
Koen