NetTalk Central

Author Topic: Field error in template code when using Conditional tab Image CSS  (Read 3630 times)

markster

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Bruce,

When using the Conditional tab on a browse display field and entering text into the Image CSS field, the template generates an extra comma in the code. See below for the redundant comma in the first (conditional) entry in the CreateImage() line, just before the last parameter: 'nt-left'. That extra comma puts the class parameter into the wrong parameter slot in the procedure call.


    elsif LOC:ToFrom = 'To' ! alternative condition for column
      loc:extra = ''
      packet.append(p_web.DivHeader('BrowseInvoice_LOC:RecipientName_'&INC:InvoiceCustomerID,,net:crc,,loc:extra))
              packet.append(p_web.CreateImage('\icons\arrow_right_green.png','16','16','',, ,loc:javascript,,0,,'nt-left') &  p_web.CreateHyperLink(p_web._jsok(Left(p_web.mform....
    else ! default settings for browse column
      loc:extra = ''
      packet.append(p_web.DivHeader('BrowseInvoice_LOC:RecipientName_'&INC:InvoiceCustomerID,,net:crc,,loc:extra))
      packet.append(p_web.CreateImage('\icons\arrow_right_green.png','16','16','',,,loc:javascript,,0,'nt-left') &  p_web.CreateHyperLink(p_web._jsok(Left(p_web.mform...
    End

Regards,

Mark

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Field error in template code when using Conditional tab Image CSS
« Reply #1 on: April 13, 2015, 10:50:15 PM »
Could I ask you to tweak a shipping example to show the problem please Mark.
Especially with template issue's it's really helpful if I have a "broken" base to work from and then move from there to a fix.

Cheers
Bruce

markster

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: Field error in template code when using Conditional tab Image CSS
« Reply #2 on: April 15, 2015, 05:55:18 AM »
Will do.

Mark

markster

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: Field error in template code when using Conditional tab Image CSS
« Reply #3 on: April 15, 2015, 06:30:41 AM »
Bruce, Attached is example app #2 modified in the MailboxBrowseControl. Go into the embeditor for that procedure and skip down to the Value::MAI:MailBoxName code. You'll see that the code for the 2 conditional images have the extra , before the 'nt-left' CSS while the default one does not. Hopefully here's a hint in tracking down the bug: in trying to duplicate the error in this example app, I had to add the conditional display for the field as a whole.

Mark

[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Field error in template code when using Conditional tab Image CSS
« Reply #4 on: April 19, 2015, 11:27:28 PM »
thanks - fixed for 8.45