Announcement

Collapse
No announcement yet.

OnScripInit gets called after ajax onchange event

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

  • OnScripInit gets called after ajax onchange event

    Is that working as designed? I have set all fields that needs to be invisible in onscriptinit. I set them off and on depending on an onchange event. But calling

    Code:
    onscriptinit:
    sc_field_display({verwachtasdatum}, 'off');
    sc_field_display({eigenwerkstatus}, 'off');
    sc_field_display({eigenwuurperdag}, 'off');
    sc_field_display({eigenwdagenperweek}, 'off');
    sc_field_display({percloonwaarde}, 'off');
    gets called after executing onchange on

    Code:
    if ({eigenwerkstatus} == 'VEW')     // Display field
    {
        sc_field_display({eigenwuurperdag}, 'on');
        sc_field_display({eigenwdagenperweek}, 'on');
        sc_field_display({percloonwaarde}, 'on');
    } else {
        sc_field_display({eigenwuurperdag}, 'off');
        sc_field_display({eigenwdagenperweek}, 'off');
        sc_field_display({percloonwaarde}, 'off');
    }
    because the field eigenwerkstatus get's unvisible after executing this code. I can work around but...
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

  • #2
    Hi Albert

    I think you need to use sc_field_disabled for {eigenwerkstatus}, in invisible mode if statement don't give a result

    Comment

    Working...
    X