I have js file it have some functions
In my master page using .js file function
It working first time but if i click again that function not call in my master page
Note: “$.colorbox” function not call second time ,its undefiend
function loginpopupopen(ctrl) {
var baseurltoaccess = '<%=GetPageFullURL("~/CartService.asmx/IsUserLoggedIn",false) %>';
$.ajax({
type: "POST",
url: baseurltoaccess,
data: "{}",
contentType: "application/json; charset=utf-8",
success: function(response) {
var result = eval(response.d);
if (result.retmsg == "failure") {
var navigationurl;
if ($(ctrl).attr('navigationurl').indexOf('?') == -1)
navigationurl = $(ctrl).attr('navigationurl') + "?";
else
navigationurl = $(ctrl).attr('navigationurl') + "&";
//second time not call the "$.colorbox" its undefined
$.colorbox({ href: $('input[type=hidden][id$=hfhostname]').val() + "/" + navigationurl + "signin=1", opacity: 0.4, initialWidth: "250", initialHeight: "180", scrolling: false });
}
else
location.href = location.href;
},
dataType: "json"
});
}
Regards
Sekar.c