Binary files link-org/.DS_Store and link/.DS_Store differ
diff -rupN link-org/link.module link/link.module
--- link-org/link.module	2010-06-14 18:14:12.000000000 -0400
+++ link/link.module	2011-04-13 04:51:17.000000000 -0400
@@ -97,6 +97,13 @@ function link_field_settings($op, $field
         '#size' => '46',
       );
 
+      $form['include_onclick'] = array(
+        '#type' => 'checkbox',
+        '#title' => t('Include onClick attribute'),
+        '#default_value' => isset($field['include_onclick']) ? $field['include_onclick'] : FALSE,
+        '#description' => t('If checked, the user will be able to add an onclick event to the link.'),
+      );
+      
       // Add token module replacements if available
       if (module_exists('token')) {
         $form['tokens'] = array(
@@ -168,6 +175,7 @@ function link_field_settings($op, $field
         '#description' => t('When output, links will use this "title" attribute (when different from the link text). Read <a href="http://www.w3.org/TR/WCAG10-HTML-TECHS/#links">WCAG 1.0 Guidelines</a> for links comformances. Tokens values will be evaluated.'),
         '#default_value' => empty($field['attributes']['title']) ? '' : $field['attributes']['title'],
       );
+
       return $form;
 
     case 'validate':
@@ -177,7 +185,7 @@ function link_field_settings($op, $field
       break;
 
     case 'save':
-      return array('attributes', 'display', 'url', 'title', 'title_value', 'enable_tokens', 'validate_url');
+      return array('attributes', 'display', 'url', 'title', 'title_value', 'enable_tokens', 'validate_url', 'include_onclick');
 
     case 'database columns':
       return array(
@@ -516,7 +524,6 @@ function theme_link($element) {
       $element['url']['#title'] = $element['#title'];
     }
   }
-
   $output = '';
   $output .= '<div class="link-field-subrow clear-block">';
   if (isset($element['title'])) {
@@ -527,6 +534,9 @@ function theme_link($element) {
   if (!empty($element['attributes']['target'])) {
     $output .= '<div class="link-attributes">'. theme('checkbox', $element['attributes']['target']) .'</div>';
   }
+  if (!empty($element['attributes']['onclick'])) {
+		$output .= '<div class="link-attributes-onclick">'. theme('textfield', $element['attributes']['onclick']) .'</div>';
+	}
   return $output;
 }
 
@@ -548,6 +558,7 @@ function _link_default_attributes() {
     'target' => LINK_TARGET_DEFAULT,
     'class' => '',
     'rel' => '',
+    'onclick' => ''
   );
 }
 
@@ -594,7 +605,14 @@ function link_process($element, $edit, $
        '#return_value' => LINK_TARGET_NEW_WINDOW,
        '#default_value' => $attributes['target'],
      );
-   }
+   } 
+	$element['attributes']['onclick'] = array(
+		'#type' => 'textfield',
+		'#maxlength' => 2048,
+		'#title' => t('onclick'),
+		'#default_value' => $attributes['onclick'],
+	);
+
    return $element;
 }
 
