NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: zolinovak on January 31, 2008, 01:50:40 PM

Title: Multi lines in NetWebBrowse
Post by: zolinovak on January 31, 2008, 01:50:40 PM
I can't figured out how to display a second line  in the NetWebBrowse procedure. In my catalog programm i want to place the price field below the product image.
On NetWebForm  have a option "Last in cell". On NetWebBrowse nothing like that.

Thanks for any help!

Zoltan Novak
Title: Re: Multi lines in NetWebBrowse
Post by: Bruce on January 31, 2008, 10:32:27 PM
Hi Zoltan,

Placing a text & image together, one under the other, is probably not too difficult - I'm guessing it can be done using an appropriate css class for that browse column.

You can split a specific line of text using the <br /> tag. (Note the trailing /, this is very important because browses need to be xHtml, not Html.
To include html in a browse column you need to tick on the option "allow xHtml in column".

You might even find this is suitable for your image / price question.

Cheers
Bruce
Title: Re: Multi lines in NetWebBrowse
Post by: Mike Grigsby on February 06, 2008, 07:28:21 PM
One thing I did, Zoltan, is to put a "child" HTML page off to the right of the browse where I manually load the image and some other data as you browse. Works pretty quickly and it doesn't make the browse so "heavy" with information.
Title: Re: Multi lines in NetWebBrowse
Post by: Mike Grigsby on February 17, 2008, 11:47:02 AM
So if I want multiple lines in a column, where would I put the <br /> tag? I'd like to do what John's wonderful example on Positive Connect does where the address is below the name. Is it done in an embed?
Title: Re: Multi lines in NetWebBrowse
Post by: John Hickey on February 19, 2008, 10:13:06 PM
Yes, I placed the code in an embed.  I created a STRING called l:Address, then filled it like so at the "Set Queue Record" embed:

! Start of "Set Queue Record"
      l:Address = 'Account: ' & CLIP(CUS:CustID) & ' Code: ' & CLIP(CUS:Code)
      l:Address = CLIP(l:Address) & '<BR>' & clip(CUS:FNam) & ' ' & clip(CUS:LNam)
      l:Address = CLIP(l:Address) & '<BR>' & clip(CUS:Address1)
 ...etc. ...

Title: Re: Multi lines in NetWebBrowse
Post by: Mike Grigsby on February 20, 2008, 09:58:36 AM
Hi John, Thanks so much for the reply. I've tried that, but it keeps wanting to convert the <BR> to readable text, usually by adding the escape codes for the angle brackets. I've also tried the equivalent of <br /> with no luck. I must be missing something.
Title: Re: Multi lines in NetWebBrowse
Post by: Mike Grigsby on February 20, 2008, 11:52:10 AM
It looks like the code does a cleaning of the string before sending the packet. Is this new in 4.30? What I'm seeing is p_web._Clean(L:Address), and I think this tries to convert it to viewable characters.

Title: Re: Multi lines in NetWebBrowse
Post by: Alan Telford on February 20, 2008, 12:29:21 PM
There is an option [ ]Allow XHTML in column.
This will stop the "cleaning" from happening.
You will need valid XHTML which means everything must have a closing tag.
I believe if you use <br /> with trailing slash it should work.

i.e. l:address = clip(line1) & <br /> & clip(line2) & <br /> & clip(line3)
Title: Re: Multi lines in NetWebBrowse
Post by: Mike Grigsby on February 20, 2008, 12:35:26 PM
Alan, I should send you the money I was about to pay a therapist! Thanks so much, that was it!