Guest User

Untitled

a guest
Jul 20th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. <script language="JavaScript" type="text/javascript">
  2. (function(){
  3. document.observe("dom:loaded", function() {
  4. var updateContactList = function(){
  5. var typeValue = $F($('contact_choose').select('input').find(function(e){ return $F(e); }));
  6. // Make sure we disable anything that is hidden so it doesn't show as an error
  7. $('phone_only').hide().select('input, select, textarea').invoke('disable');
  8. $('mail_only').hide().select('input, select, textarea').invoke('disable');
  9. $('email_only').hide().select('input, select, textarea').invoke('disable');
  10. $(typeValue+'_only').show().select('input, select, textarea').invoke('enable');
  11. $('always1').down('input[type=text]').focus();
  12. };
  13. // Note that we observe 'click' instead of 'change' below, to keep IE happy
  14. $('contact_choose').select('input').invoke('observe', 'click', updateContactList);
  15. updateContactList();
  16. })
  17. })();
  18. </script>
Add Comment
Please, Sign In to add comment