I am trying to solve a problem inside my dad’s enterprise system, the system has a button, that works just on Internet Explorer, it doesn’t work in other browsers, so it is not possible to work in this system using iPad or another Operational System… They bought this system from an enterprise called Linx, and i guess this system’s code is too dangerous, dealing with queries on the client-side (javascript).
If you know why this just works on Internet Explorer i would be so greatful!
Thanks in advice…
Observation: i just copied the button’s html and the button’s javascript function, and paste here.
<script>
function Query_onclick() {
xwhere = "";
xflag = 1;
if (xmodelos != ""){
if (xwhere != "") {
xwhere = xwhere + " and ";
}
xwhere = xwhere + " Modelagem = '" + xmodelos + "'";
}
if (xmateriais != "") {
if (xwhere != "") {
xwhere = xwhere + " and ";
}
xwhere = xwhere + " Material = '" + xmateriais + "'";
}
if (xgrupos != ""){
if (xwhere != "") {
xwhere = xwhere + " and ";
}
xwhere = xwhere + " Grupo_produto = '" + xgrupos + "'";
}
if (xsubgrupos != "") {
if (xwhere != "") {
xwhere = xwhere + " and ";
}
xwhere = xwhere + " Subgrupo_produto = '" + xsubgrupos + "'";
}
if (xcategorias != ""){
if (xwhere != "") {
xwhere = xwhere + " and ";
}
xwhere = xwhere + " p.cod_categoria in (select cod_categoria from produtos_categoria where CATEGORIA_PRODUTO ='" + xcategorias + "')";
}
if (xsubcategorias != ""){
if (xwhere != "") {
xwhere = xwhere + " and ";
}
xwhere = xwhere + " p.cod_subcategoria in (select cod_subcategoria from produtos_subcategoria where SUBCATEGORIA_PRODUTO ='" + xsubcategorias + "')";
}
if (xfabricante != ""){
if (xwhere != "") {
xwhere = xwhere + " and ";
}
xwhere = xwhere + " Fabricante = '" + xfabricante + "'";
}
if (xlinhas != "") {
if (xwhere != "") {
xwhere = xwhere + " and ";
}
xwhere = xwhere + " Linha = '" + xlinhas + "'";
}
if (xcomposicao != "") {
if (xwhere != "") {
xwhere = xwhere + " and ";
}
xwhere = xwhere + " composicao = '" + xcomposicao + "'";
}
if (xcolecoes != "") {
if (xwhere != "") {
xwhere = xwhere + " and ";
}
xwhere = xwhere + " Colecao = '" + xcolecoes + "'";
}
if (xgriffes != ""){
if (xwhere != "") {
xwhere = xwhere + " and ";
}
xwhere = xwhere + " Griffe = '" + xgriffes + "'";
}
if (xtipos != ""){
if (xwhere != "") {
xwhere = xwhere + " and ";
}
xwhere = xwhere + " Tipo_produto = '" + xtipos + "'";
}
if (produto.value != "") {
if (xwhere != "") {
xwhere = xwhere + " and ";
}
xwhere = xwhere + " produto like '" + Urlencode("%" + produto.value + "%") + "'";
}
if (descricao.value != "") {
if (xwhere != "") {
xwhere = xwhere + " and ";
}
xwhere = xwhere + " desc_produto like '" + urlencode(descricao.value) + "'";
}
if (xwhere != ""){
if ( Foto.checked == 1) {
xfoto = "&xfoto=" + Foto.checked;
}
else {
xfoto = "&xfoto=false";
}
parent.frames.Principal.location = "../pages/cat_prods.asp?xwhere=" + xwhere + xfoto;
}
else{
if ( Foto.checked == 1) {
xfoto = "?xfoto=" + Foto.checked;
}
else {
xfoto = "?xfoto=false";
}
parent.frames.Principal.location = "../pages/cat_prods.asp"+ xfoto;
}
}
</script>
<input type="Image" src="image.png" name="Query" value=" Pesquisar " onclick="Query_onclick()">
You could try changing from
parent.frames.Principal.locationtoparent.frames.Principal.location.href.