Changes

Jump to: navigation, search

Remove Options from a Combo Box Using JavaScript

7 bytes added, 15:53, 30 October 2009
no edit summary
==Remove One or More Options==
The following example removes two different [[Types]] available for new '''Level 2''' records (would be useful if you need to define complex criteria for what type of Level 2 records can be created):
<pre>
If you wish to control this by [[Role|role ]] (for example if you want a role to be able to view existing Level 2 records of a given [[Type]], but not create them...)
Include this in the variable section at the top of the script:
if (myrolelist.indexOf(",1234,")>=0)
::''Note that you must test for greater than or equal to 0. If the role is the first on listed in the users [[User|user]]'s role list it will return a 0 rather than a 1 because of the preceding comma.''
4,401
edits

Navigation menu