Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function changeInputs() {
- var id = this.getID();
- var selected = this.getSelected().get('value');
- if (!id || !value) {
- alert("NO ID or value " + id + '/' + value);
- //no id. or no value so quit
- return;
- }
- $$('tr.input_' + id).each(function(input){
- if (input.hasClass ('input_' + id + '_'+ selected )){
- alert('making visible');
- input.setStyle ('visibility','visible');
- } else {
- alert('making hidden');
- input.setStyle ('visibility','hidden');
- }
- });
- }
- window.addEvent('domready', function() {
- alert("DOM READY");
- var e = $('building_costing_mechanism');
- if (e) {
- alert("has element");
- e.addEvent('change',changeInputs.bind(e));
- }else {
- alert("No element");
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement