Heloo sir,
In given code
When i click imagebutton the onclick event from code behind fires & the javasrprit code executed.
right now the following two metods are open in javasrcipt.
but i want to open these following two functions or code in that two function in code behind page with encryption.
function Popupaudio(itemtitle) {
window.open("iframeaudio.aspx?titlename=" + itemtitle + "");
}
function Popupvideo(vimeoid) {
window.open("iframevideo.aspx?vimeoid=" + vimeoid + "");
}
the main pupose is the open the url in encrypted format.
please go throgh the code.
default.aspx.cs code
ImageButton ch_avmf1 = new ImageButton();
ch_avmf1.Attributes.Add("onclick", "GetCheckedItemID('" + ch_avmf1.ID + "','" + package1 + "','" + itemtitle + "'," + sound + "," + blank + "," + useractive + "," + userpackage + "," + enddate + "," + file_flag + "," + sound_flag + ")");
//default.aspx.cs code end
///java script code start
function GetCheckedItemID(id,pck,title,snd,blk,useract,userpck,enddte,fflag,sflag)
{
if(pck==1)
{
var sound="";
if(blk==1 )
{
if(snd==0 && fflag==0 && sflag==1 && userpck==1 && useract==1)
{
alert('Sorry This Audio/video does not exist.')
}
else
{
if(snd==0 && fflag==1 && sflag==1 && userpck==1 && useract==1)
{
alert('Sorry This Audio/video does not exist.')
}
else
{
if(snd==0 && fflag==0 && sflag==1 && userpck==0 )
{
alert("Please Buy Any Subscription Package");
}
else
{
if(snd==0 && fflag==1 && sflag==1 && userpck==0 )
{
alert("Please Buy Any Subscription Package");
}
else
{
if(snd==0 && fflag==0 && sflag==1 && userpck==1 && useract==0 )
{
alert("Your subscription package is inactive, Please contact to admin.");
}
else
{
if(snd==0 && fflag==1 && sflag==1 && userpck==1 && useract==0 )
{
alert("Your subscription package is inactive, Please contact to admin.");
}
}
}
}
}
}
}
if(title !="")
{
var order = title;
if(isStringNumeric(order)==false)
{
sound="audio" ;
}
else
{
sound="video" ;
}
}
}
var b=id;
a = b.split("-");
var c=a[1];
if(pck==1)
{
if(enddte!=1)
{
if(useract==0 && userpck==1 && snd==1 && c=="avmf" )
{
alert("Your subscription package is inactive, Please contact to admin.");
}
else
{
if(c=="avmf" && pck==1 && snd==1 && blk==1 && useract==0 && userpck==0)
{
alert("Please Buy Any Subscription Package");
}
}
}
else
{
if(enddte==1 && userpck==1 && snd==1)
{
alert("Your subscription package is expired, Please buy another subscription package");
}
else
{
if(c=="avmf" && pck==1 && snd==1 && blk==1 && useract==0 && userpck==0)
{
alert("Please Buy Any Subscription Package");
}
}
}
}
var clientid = "ctl00_ContentPlaceHolder1_" + id;
if(document.getElementById(clientid).checked==true)
{
// To Add Item To The Cart
document.getElementById('<%=HdnCurrentItemIDStatus.ClientID %>').value="";
document.getElementById('<%=HdnCurrentItemIDStatus.ClientID %>').value = "checked";
}
else
{
// Remove Item From The Cart
document.getElementById('<%=HdnCurrentItemIDStatus.ClientID %>').value="";
document.getElementById('<%=HdnCurrentItemIDStatus.ClientID %>').value = "unchecked";
}
if(pck==1)
{
document.getElementById('<%=HdnCurrentItemIDStatus.ClientID %>').value="";
document.getElementById('<%=HdnCurrentItemIDStatus.ClientID %>').value = "checked";
}
if(pck==1)
{
if(pck=="1" && blk==1 && userpck==1 && useract==1 && enddte==0 && snd==1 && sound=="audio")
{
Popupaudio(title);
}
else
{
if(pck=="1" && blk==1 && userpck==1 && useract==1 && enddte==0 && snd==1 && sound=="video")
{
Popupvideo(title);
}
}
}
}
please help me
thanks & regards
bhushan