Кнопка просто работает в Internet Explorer - PullRequest
0 голосов
/ 16 января 2012

Я пытаюсь решить проблему внутри корпоративной системы моего отца, в системе есть кнопка, которая работает только в Internet Explorer, она не работает в других браузерах, поэтому в этой системе невозможно работать с iPad или другая операционная система ... Они купили эту систему у предприятия под названием Linx, и я думаю, что код этой системы слишком опасен для работы с запросами на стороне клиента (javascript).

Если вы знаете, почему это работает только в Internet Explorer, я был бы очень рад!
Спасибо за совет ...

Замечание: я просто скопировал html кнопки и функцию javascript кнопки и вставил сюда.

<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()">

1 Ответ

1 голос
/ 16 января 2012

Вы можете попробовать перейти с parent.frames.Principal.location на parent.frames.Principal.location.href.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...