I have this code. In the click of lupa.gif
, I would call a jquery function and throw a page into it with all parameters passed like this:
HTML:
<img id='' style='display:; cursor:hand' name='Pesquisa_Contrato' width='16' height='16' src='/gen/mid/lupa.gif' border='0' alt='Pesquisa Contrato' onClick="javascript:AbrePesquisa('/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=S&ind_alteracao_contrato=&tipo_preco=','Pesquisa_Contrato','Pesquisa Contrato', 700, 500, 20, 15, 'S')">
<script>
$(function() {
$( "#dialog" ).dialog();
});
</script>
How would I do this? I have every doubt. All this in the click of the image javascript: AbrePesquisa(...)
I was forgetting something extremely important. First, the site is deito in Classic ASP. Well, there are two files. One that we will call c1.asp and another one I call c1in.asp. well, in c1.asp, I have a call to an asp function. In c1in.asp, I have the implementation of this function. This function does just that: Mount the HTML that has the magnifying glass and the search field, this here (c1in.asp):
<tr>
<td class="label_right" nowrap>Contrato </td>
<td>
<input type="text" name="num_contrato" value="" size="15" maxlength="17" tabindex="1" OnKeyPress="javascript:MascAlfaNum()" OnKeyDown="TeclaEnter()" onchange="PesquisaContratoMontaFilial();">
<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="">
<input type="text" name="nome_contrato" value="" size="50" tabindex="-1" Readonly class="camposblocks">
<input type="hidden" name="cod_ts_contrato" value="">
<input type="hidden" name="ind_tipo_pessoa" value="J" />
<div id="painelModal"></div>
</td>
</tr>
Only one as can be seen. And in c1.asp is the call:
montaContrato()
I hope this helps.
Personal, that did not work:
function AbreModal(URL, name, title, width, height, top, left, replace) {
$('#dialog').load(URL).dialog({
modal: true,
width: width,
height: height,
title: title
});
}
The call
<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="javascript:AbreModal('/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=S&ind_alteracao_contrato=&tipo_preco=','Pesquisa_Contrato','Pesquisa Contrato', 700, 500, 20, 15, 'S')">
The error (s) below:
In Chrome I get this error:
Resource interpreted as Stylesheet but transferred with MIME type text / html:
In IE, it gives pause on execution and these errors:
SCRIPT1028: Identifier, string or expected number
SCRIPT5007: The value of the 'OpenModal' property is null or not defined; is not a Function object