function detailed_link(cell_rowid) {
var $tabs = $('#infrTab').tabs();
$tabs.tabs('select', 1); // switch to third tab~
objRowData = $('#' + pageGridId).getRowData(cell_rowid);
//document.getElementById("Name").value = objRowData.amount;
loadPage('Infringement/TaskDetail', 'taskDetails'); /* Path */
}
I have write a javascript function loadPage(), that needs a path to some page as a parameter. I need to give this path from the application root. I dont want a relative path. Please let me know how can I do it.
I have this piece of Javascript in my Site.master, just underneath the jquery import and above any reference to my own scripts.
<script type="text/javascript">
//Function that provides a relative URL for cases of virtual directories.
jQuery.url = function (path) {
return '<%: Url.Action("Index","Home") %>' + path;
};
</script>
This assumes that your '/' address is handled by your Index method in your Home controller (the standard).
You can then access it via:
$.url('Infringement/TaskDetail')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With