I added the bellow javascript to show the selected item in list Header (Drop Downlist in Shop page).
But It creates problem in light box on product details Page?
How can I solve this problem?
$("#Head").ready(function() {
var url= document.URL;
var lit =url.split("115");
var lit1 = lit[0];
if(lit1 != "http://www.technoexpertz.com/dotnetnuke2/Shop/tabid/")
{
var n=url.split(".aspx");
var n1= n[1];
var country = document.getElementById("sel2");
var coun = document.getElementById("pag");
for(var i, j = 0; i = country.options[j]; j++) {
if(i.value == n1)
{
country.selectedIndex = j;
country.options[country.options.selectedIndex].setAttribute("selected", "selected");
}
}
for(var i, j = 0; i = coun.options[j]; j++) {
if(i.value == n1)
{
coun.selectedIndex = j;
coun.options[country.options.selectedIndex].setAttribute("selected", "selected");
}
}
}
});
But It creates problem in light box on product details Page?
How can I solve this problem?
$("#Head").ready(function() {
var url= document.URL;
var lit =url.split("115");
var lit1 = lit[0];
if(lit1 != "http://www.technoexpertz.com/dotnetnuke2/Shop/tabid/")
{
var n=url.split(".aspx");
var n1= n[1];
var country = document.getElementById("sel2");
var coun = document.getElementById("pag");
for(var i, j = 0; i = country.options[j]; j++) {
if(i.value == n1)
{
country.selectedIndex = j;
country.options[country.options.selectedIndex].setAttribute("selected", "selected");
}
}
for(var i, j = 0; i = coun.options[j]; j++) {
if(i.value == n1)
{
coun.selectedIndex = j;
coun.options[country.options.selectedIndex].setAttribute("selected", "selected");
}
}
}
});