I'm trying to create a simple AJAX application utilizing jquery-1.5.1 and for some reason it just isn't working.
This is the javascript function:
Here is the empty div to display the info and below it is the anchor tag that calls the function:Code:<script type="text/javascript" src="jquery-1.5.1.js"></script> <script language="javascript" type="text/javascript"> function viewDetails(cid) { $("#resultDetails").html("Loading...").show(); var url="parse_details.php"; $.post(url{companyId: cid},function(data){ $("#resultDetails").html(data).show(); }); } </script>
And then in the same directory I have a basic PHP file which I already made sure ran correctly without errors. The problem is when I click on the "Option 1" link, nothing happens.HTML Code:<div id="resultDetails"></div> <br /> <br /> <a href="#" onClick="return false" onmousedown="javascript:viewDetails('1');">Option 1</a>


Reply With Quote
Bookmarks