Run a page inside a jquery modal screen by ajax without Iframe

Asked

Viewed 635 times

0

It is possible to run a page that is inside my dir, within a modal without IFrame for ajax? If yes, how would I do that? At the time my pages would have this path: ../../GEN/asp/pagina.asp?parâmetros=

That would be my modal:

<link href="https://code.jquery.com/ui/1.11.3/themes/flick/jquery-ui.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://code.jquery.com/ui/1.11.3/jquery-ui.js"></script>

Below is my current jquery function, which is not working properly.

var dialog = $("#dialog");
    var openModal = $("#btnLupa");

    dialog.dialog({
        modal: true,
        autoOpen: false,
    });

    dialog.load(function () {
        dialog.dialog("open");
    });

    var AbrirModal = function (url, title, width, height) {
        dialog.dialog("option", "width", width);
        dialog.dialog("option", "height", height);
        dialog.dialog("option", "title", title);
        dialog.attr("src", url);
    }

This is my current call to the jquery function

<img id='btnLupa' style='display:; cursor:hand' name='Pesquisa_Contrato' width='16' height='16' src='/gen/mid/lupa.gif' border='0' alt='Pesquisa Contrato' onclick='AbrirModal("http://amlsp1844/GEN/ASP/GEN0001a.asp?ind_situacao=&tipo_empresa=&ind_classificacao=&p_cod_tipo_contrato=&indsubmit=false&txt_nome_campo_cod=num_contrato&txt_nome_campo_cod_ts=cod_ts_contrato&txt_nome_campo_desc=nome_contrato&ind_tipo_pessoa=J&funcao_executar=PesquisaContratoMontaFilial();&abre_modal=N&ind_alteracao_contrato=&tipo_preco=", "Pesquisa Contrato", 480, 360)'>

This is what I have now, but I can throw everything up and redo new things, but I have no idea. With IFrame is giving way and would like to abandon the IFrame.

1 answer

0


Well, as for this post I solved. How? As for ajax without Iframe, I had to abandon, because I have to continue using Iframe. And to solve the problem of Iframe that was giving, in my case here, I would have to call a new page before calling the necessary page. That way you wouldn’t be able to help and didn’t even know it. A guy here found out by accident. Thanks and within 2 days I close the post.

  • Search the load function()

Browser other questions tagged

You are not signed in. Login or sign up in order to post.