4
There is a doubt in this forum here, but it doesn’t solve my problem. I have includes, including include jquery in the first line because link found this:
Because, JS interpreter search for $ before is Even Loaded and defined.
My mistake is the title of this post. Check it out. In the same file I have include, the function and the call button
<head>
<title><%=Application("app")%></title>
<script type="text/javascript" src="../../gen/modal/jquery-ui.min.js"></script>
<link href="\gen\css\css002.css" rel="stylesheet" type="text/css">
<!-- Include the code and stylesheet for the grid control. -->
<script language="jscript.encode" src="../../gen/inc/ebagrid.js"></script>
<link type="text/css" rel="stylesheet" href="../../gen/inc/styles/xp/eba.css" />
<script src="../../gen/js/cpaint2.inc.compressed.js" type="text/javascript"></script>
</head>
Here’s the function call button. It’s commented on why I’m creating it now and seeing if it’s loading from the bank and so on:
<div><input type="button" id="btn" value="teste" onclick="CarregaTabela();" /></div>
And here the javascript function with jquery. The function is called Table Load:
<script language="javascript">
var carregaDados = null;
function reexecute() {
document.form01.action = '<%=session("pgm_retorno")%>';
document.form01.submit();
}
function CarregaTabela() {
var str = "";
$.ajax({
url: '../../prs/asp/prs0061b_crosbrowser.asp',
datatype: 'json',
contentType: 'application/json; charset=utf-8',
type: 'POST',
data: JSON.stringify({carregaDados: rsPesquisa}),
success: function (data) {
alert(data.carregaDados.nome_tipo_prestador);
$(data.resultado_acao).each(function () {
//str += '<option value=' + this.Acao1 + '>' + this.Acao1 + '</option>';
})
//$('#cbxAcao').html(str);
str = "";
},
error: function (error) {
}
})
}
</script>
At first it seems to be missing jQuery import before the
jquery-ui.min.js
. They’re not the same.– KaduAmaral
@Kaduamaral, I thought jquery ui-min was enough. What should I include? What import. Put your comment as an answer, in case you decide to mark your answer.
– pnet
@pnet seems to lack the Jquery reference. Include it before all Scripts.
– Marconi