On Codeigniter I have a code
HTML
//ROOTPATH is the constant Path and $recordId is coming from a loop.
<a href="#" onclick="windowRedirect('<?php echo ROOTPATH; ?>&action=deleteRecord&id=<?php echo $recordId; ?>','Are you sure you want to Delete');return false;">Delete</a>
Javascript
windowRedirect(url,msg)
{
if(confirm(msg))
{
window.location.href = url;
}
else
{
return false;
}
}
I have written a simple javascript which will redirect url if user click on OK button but I am getting weird problem on Google chrome where this code is working perfectly on Mozila Firefox, IE 8/9 and Applae Safari. Can any one tell me how can I solve this Google Chrome Problem.
Though I have a doubt this script is probably not working because of '#' on the href field but I am not sure.