Guest User

Untitled

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