Can anyone tell me why my alert(id) isn't firing off? Nada, zilch, zippo
<p>First of all let me say thank you to everyone that offered answers...I have definitely advanced and even on my local machine everything is working perfectly.</p>

<p>However it's not working on the server. I tried a bunch of things such as putting session_start() into the included files but nothing has taken.</p>

<p>Rather than post the code here I've zipped up a few files:</p>

<p><a href="http://nerotic.net/aux/code.zip" rel="nofollow">http://nerotic.net/aux/code.zip</a></p>

<p>and you can see the site at the same URL removing /code.zip</p>

<p>index.php: has the AJAX in it...
index_page_content.inc.php: is my file to determine which content gets included
backend.php: the PHP to process the AJAX
sound-how.php: one of the pages that gets included by index.php</p>

<p>The behavior is weird. It won't echo 'src' where I echo it, however it will display it where I'm echoing 'section'. But as soon as I reload it goes back to echoing 'section' in the exact same place.</p>

<p>Also, in Chrome every couple of links that I click on makes the entire page reload.</p>

<p>So if anyone can tell me what I'm doing wrong :)</p>

<p>Thanks in advance.</p>

<blockquote>
  <p>ORIGINAL POST</p>
</blockquote>

<p>I'm new at PHP and relearning JS so any help would be appreciated.</p>

<pre><code>&lt;script language="JavaScript"
type="text/javascript"&gt;

    $(document).ready(function() {

          $("div.tabs").tabs(".images &gt; div", {

                // enable "cross-fading" effect
                effect: 'fade',
                fadeInSpeed: 600,
                fadeOutSpeed: 1000,

                // start from the beginning after the last tab
                rotate: false

              // use the slideshow plugin. It accepts its own&gt; configuration
              }).slideshow({autoplay: false, interval:5000});


          $("a.lnav").onclick(function() {
                    // Get the ID of the link
                    var src = $(this).attr("id");
                    alert(id);

                    // Send Ajax request to backend.php, with src set as "id in&gt; the POST data
                    $.post("/backend.php", {"id": src});
                });

          });  &lt;/script&gt;
</code></pre>
