Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script language="JavaScript" type="text/javascript">
- (function(){
- document.observe("dom:loaded", 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();
- };
- // Note that we observe 'click' instead of 'change' below, to keep IE happy
- $('contact_choose').select('input').invoke('observe', 'click', updateContactList);
- updateContactList();
- })
- })();
- </script>
Add Comment
Please, Sign In to add comment