Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script language="JavaScript" type="text/javascript">
- (function(){
- var updateContactList = function(){
- var typeValue = $F($('contact_choose').select('input').find(function(e){ return $F(e); }));
- // Make sure we disable anything that is hidden so it doesn't show as an error
- $('phone_only').hide().select('input, select, textarea').invoke('disable');
- $('mail_only').hide().select('input, select, textarea').invoke('disable');
- $('email_only').hide().select('input, select, textarea').invoke('disable');
- $(typeValue+'_only').show().select('input, select, textarea').invoke('enable');
- $('always1').down('input[type=text]').focus();
- };
- document.observe('dom:loaded', function(){
- // put last two lines of that function here });
- $('contact_choose').select('input').invoke('observe', 'change', updateContactList);
- updateContactList();
- });
- })();
- </script>
Add Comment
Please, Sign In to add comment