HTA VBScript and CSS3+HTML5. Code not running correctly when <meta> for css3 applied

后端 未结 1 887

I have a problem applying CSS3 and pretty round buttons to my HTA app.

As soon as I enable

1条回答
  •  长情又很酷
    2021-01-14 20:24

    I can't say my answer could be considered well-documented. However, we do find a culprit in passing parameters by reference, undoubtedly. Times change, none the less (being nearly 50 years in programming) I dare say that all the implementation variety of the pass by reference concept seems to keep equivocalness eternally. Not only in different programming languages...

    VBScript, for instance: the same script gives different results with Windows script host, or (to keep in topic) with HTA and different meta http-equiv tags, e.g.

    
    
    
    
    

    I can offer working version of your HTA

    • Main change: your arrays arrX (i.e. arr0(y), arr1(y), … arr7(y)) combined in one quasi-matrix die2d(X)(y) and accordant passing ByRef arrX replaced with ByVal X. More explanation in code comments.
    • Additional button Test Array with corresponding onClick procedure Sub TestArray to demonstrate ByRef passed parameters treatment and behaviour (array type). Click it more than once to see in-sub local changes versus script public changes. Cf. also comments in code.
    • Additional (alike) button Test Scalar, procedure Sub TestScalar to show ByRef passed parameters behaviour (not array type).
    • Absolutely unsuccessful attempt to trap and inhibit Esc, F5 and Alt+F4 keys. For instance, the refresh F5 key clears the form and data at all...
    • Crucial changes with comments in code.
    • Some minor cosmetic mutations.
    • Some minor debugging leavings, e.g. Option Explicit etc.
    • Untouched some inconsistency in logic, e.g. in DataAreaXb.InnerHTML displayed another value than computed (and saved) arrX(3) Points.

    Here's the code:

    
    
    KPI reporting tool
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    Event Weight Times done TOTAL
    INCIDENTS:
    REQUESTS:
    REASSIGNMENTS:
    UPDATES:
    TRANSFERS:
    ASSISTS:
    PASSINGS:

    0 讨论(0)
提交回复
热议问题