I need to open fancy box with in fancybox on a link button click
my parent fancy box code is like this and my code is in Jquery.
var popup = $("#popupApp");
alert("hIIII");
alert(appType);
alert(username);
var appUrl = "Applications/" + appType + ".aspx?UserName=" + username;
var popupGrid = "<div><iframe width='900px' height='500px' frameborder='0' ";
popupGrid += "src='" + appUrl + "'> ";
popupGrid += "<p><asp:Label ID='iFramesSupportMsg' runat='server' meta:resourcekey='iFramesSupportMsg' /></p> ";
popupGrid += "</iframe></div>";
alert(popupGrid);
$("<a title='Application View' />").fancybox({
'content': popupGrid,
'easingIn': 'easeOutBack',
'easingOut': 'easeInBack',
'transitionIn': 'fade',
'transitionOut': 'fade',
'titlePosition': 'over',
'titleFormat': function () {
var action = false;
var assign = false;
var status = $(appStatus + ' span').html();
if (role == "LCA_Admin" && status == "Pending LCA Approval")
action = true;
else if (role == "National_Admin" && status == "Pending National Approval")
action = true;
else if (role == "Admin") {
if (nationalAdmin == null || nationalAdmin.length == 0 || nationalAdmin == " ")
assign = true;
}
var bar = "<div id='fancybox-title-over' style='overflow:auto;background-color:rgb(80,80,80) '>";
bar += "<div style='float:left;'>";
bar += "<a href='" + appUrl + "&print=1' target='blank' class='minibutton btn-copy' ><span><span class='icon'></span>Print</span></a>"
bar += " ";
bar += "</div>";
if (assign) {
bar += "<div id='assignButton' style='float:left'>";
bar += "<a class='minibutton btn-split' onclick='prepareAssignPanel()' ><span><span class='icon'></span>Assign National Reviewer</span></a>"
bar += "</div>";
}
bar += "<div style='float:right;text-align:right;'>";
bar += "<strong id='popupStatus' style='color:white;font-weight:bold;margin-right:15px'>" + appStatus + "</strong>";
if (action) {
bar += "<div id='actionButtons' style='float:right'>";
bar += "<a class='minibutton btn-back' onclick='approveApp(0,\"" + appType + "\",\"" + username + "\")'><span><span class='icon'></span>Reject Application</span></a>"
bar += " ";
var ll = 'WebForm1.aspx';
// bar += "<a id='anch' onclick='bbg()' title=\"add a caption to title attribute / or leave blank\" class=\"thickbox\">open child fancy box On this anchor tag click</a>";
bar += "</div>";
} else {
}
bar += "</div>";
bar += "</div>";
alert(bar);
return bar;
}
What is the point of using linkbutton. You can simply anchor tag for this. Link button gets converted to anchor with the event in href. Anyway you are overriting the href. Youcan check the following link-
vikas227
Member
623 Points
802 Posts
how to open fancy box with in a fancy box on a link botton On-click
May 06, 2012 05:27 PM|LINK
I need to open fancy box with in fancybox on a link button click
my parent fancy box code is like this and my code is in Jquery.
var popup = $("#popupApp");
alert("hIIII");
alert(appType);
alert(username);
var appUrl = "Applications/" + appType + ".aspx?UserName=" + username;
var popupGrid = "<div><iframe width='900px' height='500px' frameborder='0' ";
popupGrid += "src='" + appUrl + "'> ";
popupGrid += "<p><asp:Label ID='iFramesSupportMsg' runat='server' meta:resourcekey='iFramesSupportMsg' /></p> ";
popupGrid += "</iframe></div>";
alert(popupGrid);
$("<a title='Application View' />").fancybox({
'content': popupGrid,
'easingIn': 'easeOutBack',
'easingOut': 'easeInBack',
'transitionIn': 'fade',
'transitionOut': 'fade',
'titlePosition': 'over',
'titleFormat': function () {
var action = false;
var assign = false;
var status = $(appStatus + ' span').html();
if (role == "LCA_Admin" && status == "Pending LCA Approval")
action = true;
else if (role == "National_Admin" && status == "Pending National Approval")
action = true;
else if (role == "Admin") {
if (nationalAdmin == null || nationalAdmin.length == 0 || nationalAdmin == " ")
assign = true;
}
var bar = "<div id='fancybox-title-over' style='overflow:auto;background-color:rgb(80,80,80) '>";
bar += "<div style='float:left;'>";
bar += "<a href='" + appUrl + "&print=1' target='blank' class='minibutton btn-copy' ><span><span class='icon'></span>Print</span></a>"
bar += " ";
bar += "</div>";
if (assign) {
bar += "<div id='assignButton' style='float:left'>";
bar += "<a class='minibutton btn-split' onclick='prepareAssignPanel()' ><span><span class='icon'></span>Assign National Reviewer</span></a>"
bar += "</div>";
}
bar += "<div style='float:right;text-align:right;'>";
bar += "<strong id='popupStatus' style='color:white;font-weight:bold;margin-right:15px'>" + appStatus + "</strong>";
if (action) {
bar += "<div id='actionButtons' style='float:right'>";
bar += "<a class='minibutton btn-back' onclick='approveApp(0,\"" + appType + "\",\"" + username + "\")'><span><span class='icon'></span>Reject Application</span></a>"
bar += " ";
var ll = 'WebForm1.aspx';
// bar += "<a id='anch' onclick='bbg()' title=\"add a caption to title attribute / or leave blank\" class=\"thickbox\">open child fancy box On this anchor tag click</a>";
bar += "</div>";
} else {
}
bar += "</div>";
bar += "</div>";
alert(bar);
return bar;
}
}).trigger('click');
//sizing workaround
$("#fancybox-outer").css("width", "920px");
$("#fancybox-content").css("width", "920px");
$("#fancybox-outer").css("height", "565px");
}
}
}
}
});
asteranup
All-Star
30184 Points
4906 Posts
Re: how to open fancy box with in a fancy box on a link botton On-click
May 07, 2012 06:44 AM|LINK
Hi,
What is the point of using linkbutton. You can simply anchor tag for this. Link button gets converted to anchor with the event in href. Anyway you are overriting the href. Youcan check the following link-
http://forums.asp.net/p/1761192/4795946.aspx/1?Re+Open+new+form+in+Jquery+Light+box+ASP+net
Anup Das Gupta
Mark as Answer if you feel so. Visit My Blog