Parent Page Code:-
<a href="javascript:openDialog('IRClearanceActivation.aspx?empcode=<%# Eval("ADEMPCODE") %>&ResigID=<%# Eval("RESIGNATIONID") %>',800,480)">
<img id="Img2" style="padding-right: 2px; vertical-align: middle" src="../../Images/icon_ticketbullet.gif" runat="server" alt="Ticket" />
<b>ACTIVATE</b></a>
<script type="text/javascript">
function openPopupwithScrol(strOpenUrl, width, height) {
var winTop = (screen.height - height) / 2;
var winLeft = (screen.width - width) / 2;
var windowFeatures = "location=no,status=no,width=" + width + ",height=" + height;
windowFeatures = windowFeatures + ",left = " + winLeft + ",";
windowFeatures = windowFeatures + "top=" + winTop + ",resizable" + ",scrollbars";
//window.open (strOpenUrl, "mywindow", "TOOLBAR=no,MENUBAR=no,SCROLLBARS=yes,RESIZABLE=no,LOCATION=no,DIRECTORIES=no,STATUS=no,width="+width+",height="+height);
window.open(strOpenUrl, "mywindow", windowFeatures);
}
function openDialog(strOpenUrl, width, height) {
var retVal = window.showModalDialog(strOpenUrl, null, "dialogHeight:" + height + "px;dialogWidth:" + width + "px;status:0;resizable:1;edge:raised;scroll:1");
if (retVal == "1") {
window.location = "ListPendingClearance.aspx";
}
}
</script>
Child Window Code:-
BTN Click:- ScriptManager.RegisterClientScriptBlock(Page, GetType(), "al1", "alertMe('1')", true);
<script language="javascript" type="text/javascript">
function alertMe(val)
{
if(val=="1")
{
alert("Information updated successfully");
window.returnValue ="1";
window.close();
}
else if(val=="2")
{
alert("Update failed");
window.returnValue ="1";
window.close();
}
}
</script>
<a href="javascript:openDialog('IRClearanceActivation.aspx?empcode=<%# Eval("ADEMPCODE") %>&ResigID=<%# Eval("RESIGNATIONID") %>',800,480)">
<img id="Img2" style="padding-right: 2px; vertical-align: middle" src="../../Images/icon_ticketbullet.gif" runat="server" alt="Ticket" />
<b>ACTIVATE</b></a>
<script type="text/javascript">
function openPopupwithScrol(strOpenUrl, width, height) {
var winTop = (screen.height - height) / 2;
var winLeft = (screen.width - width) / 2;
var windowFeatures = "location=no,status=no,width=" + width + ",height=" + height;
windowFeatures = windowFeatures + ",left = " + winLeft + ",";
windowFeatures = windowFeatures + "top=" + winTop + ",resizable" + ",scrollbars";
//window.open (strOpenUrl, "mywindow", "TOOLBAR=no,MENUBAR=no,SCROLLBARS=yes,RESIZABLE=no,LOCATION=no,DIRECTORIES=no,STATUS=no,width="+width+",height="+height);
window.open(strOpenUrl, "mywindow", windowFeatures);
}
function openDialog(strOpenUrl, width, height) {
var retVal = window.showModalDialog(strOpenUrl, null, "dialogHeight:" + height + "px;dialogWidth:" + width + "px;status:0;resizable:1;edge:raised;scroll:1");
if (retVal == "1") {
window.location = "ListPendingClearance.aspx";
}
}
</script>
Child Window Code:-
BTN Click:- ScriptManager.RegisterClientScriptBlock(Page, GetType(), "al1", "alertMe('1')", true);
<script language="javascript" type="text/javascript">
function alertMe(val)
{
if(val=="1")
{
alert("Information updated successfully");
window.returnValue ="1";
window.close();
}
else if(val=="2")
{
alert("Update failed");
window.returnValue ="1";
window.close();
}
}
</script>