NetTalk Central

Author Topic: Strange Behavior on Browse with Conditional IMG Class  (Read 10140 times)

BColladay

  • Newbie
  • *
  • Posts: 39
    • View Profile
    • Email
Strange Behavior on Browse with Conditional IMG Class
« on: November 23, 2010, 12:26:58 PM »
NetWebBrowse-Fields-Conditional Tab-Properties

When I add a display option in the Conditional Tab.  And fill it out as the attached image shows, I get a compile error and points to the following code.  The offending section of the display options is the Image CSS.

You can see in the code snippet that in the pat:PlaceHolder = 'P' section, the CreateImage() has 2 extra commas before the class name and an unmatched ) after.  If I take the 'unregpat' class name out of the "Display Options" that section returns to looking like the pat:PlaceHolder='' section

Code: [Select]
code
  If p_web.GetSessionLoggedIn() = 0 then loc:FormOk = 0.
    if false
    elsif pat:Placeholder = 'P'
      packet = clip(packet) & p_web.DivHeader('pat:Name_'&pat:PatientID,,net:crc)
      packet = clip(packet) & p_web.CreateImage('images/unregpat.png','16px','24px','unregistered patient',,,,,,'unregpat'))&p_web.CreateHyperLink(Left(Format(pat:name & '  ' & pat:Suffix,'@s40')),,,p_web.combine(p_web.site.style.BrowseHyperlinks,,),,,,0)
    elsif pat:Placeholder = ''
      packet = clip(packet) & p_web.DivHeader('pat:Name_'&pat:PatientID,,net:crc)
      packet = clip(packet) & p_web.CreateImage('images/regpat.png','16px','24px','registered patient',,,,)&p_web.CreateHyperLink(Left(Format(pat:name & '  ' & pat:Suffix,'@s40')),,,p_web.combine(p_web.site.style.BrowseHyperlinks,,),,,,0)
    else
      packet = clip(packet) & p_web.DivHeader('pat:Name_'&pat:PatientID,,net:crc)
      packet = clip(packet) & p_web.CreateImage('','','','',,,,,,'') & p_web._jsok(Left(Format(pat:name & '  ' & pat:Suffix,'@s40')),0)
    End
    packet = clip(packet) & p_web.DivFooter(Net:NoSend)
    if loc:eip = 1
      do SendPacket
    end

[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Strange Behavior on Browse with Conditional IMG Class
« Reply #1 on: November 24, 2010, 09:15:18 AM »
Fixed in 5.04
(should be on the site shortly.)

BColladay

  • Newbie
  • *
  • Posts: 39
    • View Profile
    • Email
Re: Strange Behavior on Browse with Conditional IMG Class
« Reply #2 on: November 24, 2010, 10:15:14 AM »
Thank you kind sir!