I have two dropdown boxes, which, when clicked, return via ajax some information in a div. Inside that information is are multiple links.
When I click on the left select- the links in the div below work fine. If I refresh and click on the right select- the links in the div below work fine. So each individual select box works as I would expect it. But... if I refresh and click on the left select, then click on the right select - the link for that right select work fine but the links from the left select no longer work? The links for the right select always work, regardless See http://ncas-cms.nerc.ac.uk/data/startFiles/not_working_anim_overlay.php Any ideas what is going wrong? abbreviated code below for the form - hand typed in so there may be typos [code] $(document).ready(function() { $("#wrapBA").hide(); $("#wrapMO)").hide(); $("select#ba").change(function() { var ba = $("select#ba").val(); //var ba = $ (this).children("option:selected").attr("value"); $.ajax({ type: "POST", url: "not_working_overlay_info.php", data: "ba=" + ba, dataType: "html", cache: false, error: function(){ alert('Error loading BA start files'); }, success: function(data) { $("#wrapBA").html(data); $("#BAModelName").html("BA - "+ba).show().addClass("BAModelName"); $("#wrapBA").slideDown('slow'); } }); return false; }); $("select#mo").change(function() { var mo = $("select#mo").val(); $.ajax({ type: "POST", url: "not_working_overlay_info.php", data: "mo=" + mo, dataType: "html", cache: false, error: function(){ alert('Error loading MO start files'); }, success: function(data) { $("#wrapMO").html(data); $("#MO_ModelName").html("MO - "+mo).show().addClass("MO_ModelName"); $("#wrapMO").slideDown('slow'); } }); return false; }); }); <div class="BAModelName" id="BAModelName">No BA Model Chosen</div> <div id="wrapBA"></div> <div class="MO_ModelName" id="MO_ModelName">No MO Model Chosen</div> <div id="wrapMO"></div> [/code] abbreviate relevant not_working_overlay_info.php - [code] for ($m=1;$m<=12;$m++) { echo '<div class="availableBADC_'.$m.' "><a href="test.php">'.$m.'</ a></div>'; } [/code]