how to First Redirect to particular URL and after that execute function logic in JavaScript ?
i have try following code. JavaScript :
<script type="text/javascript">
function onHrefClick(varHref) {
window.open(varHref, '_blank');
//here code
}
</script>
HTML:
<a href="#" onclick="onHrefClick('www.google.com')">Google</a>
But it always first execute my code and then it will redirect to URL.
Update :
i try this also it will open first popup window then redirect on page. it will wait for redirect till i am not click on Popup OK button.
<script type="text/javascript">
function onHrefClick(varHref) {
window.open(varHref, '_blank');
alert(varHref);
}
I want to redirect on external link so here no any parent or child concept