User:Jpond/SF Dynamic Screen Updating
Dynamic Screen Updating
editThis project is to add the ability to dynamically change information on the browser screen using javascript when a field is changed in Semantic Forms.
The mechanism will be to add a parameter to the field definition, onchange which will invoke a javascript of the same name defined in the namespace MediaWiki.
So, for example, in a form:
{{{field|age|onchange=UpdateEligibility,param 1, param 2, . . .}}}
SF would invoke the javascript function UpdateEligibility defined in MediaWiki:UpdateEligibility.js when the field "age" is changed and pass it the comma delimited parameters.
Why MediaWiki Namespace?
editNormally, maintenance of the MediaWiki namespace is limited to bureaucrats and sysops. Giving users the unadulterated right to create potentially harmful javascript is risky at best, so limiting it to folks who are supposed to know what they're doing is probably preferable.