Introduction
Though this article I will discuss how we can open popup window using anchor tag in .aspx page.
HTML CODE
Paste this javascript function inside the <head> tag of .aspx page.
<head runat="server">
<title></title>
<script type="text/javascript">
<!--
function popup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
// You can set the height width scrollbar & menubar according to your
// requirement
window.open(href, windowname, 'width=700,height=400,scrollbars=yes');
return false;
}
//-->
</SCRIPT>
</head>
Now see the body section of the .aspx page. I am calling the javascript function, which we have been created inside the head tag named popup()inside the <a>anchor tag. For this see below
<body>
<form id="form1" runat="server">
<div>
<a href ="http://useofaspdotnet.blogspot.com/" onclick="return popup(this,'examplea')">this link</a>
</div>
</form>
</body>
See output below in popup window
good its working
ReplyDeleteHi!! jay suresh kumawat Thankx you sir. Please feel free to get in touch with my blog and you can also give us your expensive suggestions to improve this blog.
DeleteReally good one
ReplyDeleteLearn digital ,marketing masters course for free online stop wasting your time in searching . Click the links below to register limited seats are left
ReplyDeleteDigital Marketing Agency Mumbai
Digital Marketing Agency In Noida
Digital Agency Noida
Digital Marketing Agency In Chennai
Digital Marketing Services in Delhi