Redirecting to another URL based on conditions

Rajesh_Kumar
Posted by Rajesh_Kumar under JavaScript category on | Points: 40 | Views : 495
<script type="text/javascript">
function redirect_to_web_page()
{
var page_url = document.location.href.toLowerCase();

if (page_url.indexOf('frm_project_master.aspx') != -1)
document.location = 'http://domain_name/frm_project_master.aspx';

if (page_url.indexOf('frm_requisition_master.aspx') != -1)
document.location = 'http://domain_name/frm_requisition_master.aspx';
}
</script>

Comments or Responses

Login to post response