Announcement

Collapse
No announcement yet.

Bug in php parser while parsing ajax events

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bug in php parser while parsing ajax events

    This will NOT work:

    Code:
    if ({arbeidsgeschiktstatus} == 'VAG')     // Display field
    {
        sc_field_display({verwachtasdatum}, 'on');
    }
    else
    {
        sc_field_display({verwachtasdatum}, 'off');
    }
    
    if ({arbeidsgeschiktstatus} == 'GAG')     // Display field
    {
        sc_field_display({verwachtasdatum}, 'on');
        sc_field_display({eigenwerkstatus}, 'on');
    }
    else
    {
        sc_field_display({verwachtasdatum}, 'off');
        sc_field_display({eigenwerkstatus}, 'off');
    }
    This DOES work:

    Code:
    sc_field_display({verwachtasdatum}, 'off');
    sc_field_display({eigenwerkstatus}, 'off');
    
    
    if ({arbeidsgeschiktstatus} == 'VAG')     // Display field
    {
        sc_field_display({verwachtasdatum}, 'on');
    }
    
    if ({arbeidsgeschiktstatus} == 'GAG')     // Display field
    {
        sc_field_display({verwachtasdatum}, 'on');
        sc_field_display({eigenwerkstatus}, 'on');
    }
    The php parser is loosing it's track obviously...
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

  • #2
    To complete it and give it back to sc you should also add the generated code in that area. Then they should be able to fix it (one hopes....).

    Comment


    • #3
      Albert,

      Doesn't your "not working" code have a bug?
      I'm assuming that your issue is that if
      {arbeidsgeschiktstatus} == 'VAG' that the field verwachtasdatum is not being display?
      The first conditional will display it, but the second one will turn it off because it is not 'GAG'?
      Your working code, works because it is not turned off by the second conditional.

      Sorry if I'm misunderstanding.

      Comment


      • #4
        Originally posted by dczanik View Post
        Albert,

        Doesn't your "not working" code have a bug?
        I'm assuming that your issue is that if
        {arbeidsgeschiktstatus} == 'VAG' that the field verwachtasdatum is not being display?
        The first conditional will display it, but the second one will turn it off because it is not 'GAG'?
        Your working code, works because it is not turned off by the second conditional.

        Sorry if I'm misunderstanding.
        Exactly.

        Albert, isn't that the issue?

        regards,
        Bernhard

        Comment


        • #5
          I'm ashamed, yes, that's the case.
          Albert Drent
          aducom software netherlands
          scriptcase partner, reseller, support and (turn-key) development
          www.scriptcase.eu / www.scriptcase.nl

          Comment


          • #6
            I move out of bugs subforum
            /Giuseppe

            Professional Scriptcase Services
            Some Customers opinions

            Comment

            Working...
            X