title: jQuery ajax function not working in Safari (Firefox, Chrome, IE okay)
body: <p>I'm no javascript wiz, but am a bit puzzled as to how this is working in three major browsers, but not Safari... is there something wrong with this code? Basically I'm just using this in conjunction with a php/mysql callback at the given url to track link clicks.</p>
  
  <pre><code>Drupal.behaviors.NodeDownloadCounter = function() {
  
      $('a.ndc-link').click(function() {
          $.post('http://www.pixeledmemories.com/node-download-counter/log/' + this.name);
          return true;
      });
  
  };
  </code></pre>
  
  <p>Using Drupal behaviors here instead of </p>
  
  <pre><code>$(document).ready(function() {
  </code></pre>
  
  <p>(correct Drupal method) but I've tried it both ways and it doesn't make a difference.</p>
  
  <p>I've also tried removing "return true", but with no effect.</p>
  
  <hr>
  
  <p>Okay, further testing reveals that having the click trigger an alert DOES work in Safari:</p>
  
  <pre><code>$('a.ndc-link').click(function() {
      alert('testing (ignore)');
      $.post('http://www.pixeledmemories.com/node-download-counter/log/' + this.name);
      return true;
  });
  </code></pre>
  
  <p>But still nothing being logged to mysql. Here is my callback function:</p>
  
  <pre><code>function node_download_counter_log($nid)
  {
      global $user;
    $timestamp = time();
      $title = db_result(db_query("SELECT title FROM {node} WHERE nid = %d", $nid));
  
    db_query("INSERT INTO {node_download_counter} (nid, title, download_count, last_download, last_uid) VALUES (%d, '%s', %d, %d, %d) 
                      ON DUPLICATE KEY UPDATE download_count=download_count+1, last_download = %d, last_uid = %d", $nid, $title, 1, $timestamp, $user-&gt;uid, $timestamp, $user-&gt;uid);
  
    db_query("INSERT INTO {node_download_counter_log} (nid, title, uid, timestamp) VALUES (%d, '%s', %d, %d)", $nid, $title, $user-&gt;uid, $timestamp);
  
  }
  </code></pre>