NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Koen Tjoa on November 30, 2011, 04:04:23 AM

Title: New line in loc:alert
Post by: Koen Tjoa 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
Title: Re: New line in loc:alert
Post by: Rene Simons 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
Title: Re: New line in loc:alert
Post by: Koen Tjoa 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
Title: Re: New line in loc:alert
Post by: ccordes 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.
Title: Re: New line in loc:alert
Post by: Koen Tjoa on December 02, 2011, 03:29:37 AM

Hi Ccordes,

Thanks, that did the trick.  :)

Cheers,
Koen