i have a function like this:
function contentDisp()
{
$.ajax({
url : "../Patient/brest/ros_brest.php",
success : function (data) {
$("#dynamicContent").html(data);
}
});
}
i have a menu like this:
<div id="leftmenu">
<ul id="accordion">
<li><div>BREAST</div>
<ul>
<li ><a href="#" onClick="contentDisp();">BREAST</a></li>
</ul>
When end user clicks on menu item the concerned page to be display in the div alloted for that . Everything is working fine but now if i want to do the same for all menu items then how i have to do with this: url : “../Patient/brest/ros_brest.php”, instead of the url statically how i have to pass it dynamically.
Thank you in advance
ramsai
However, What I would suggest is you remove the onClick handlers and put the url as the href
that way with js off users still get somethign (read about progressive enhancement to learn more) like so
Demo : http://jsbin.com/ixifah/4