简体   繁体   English

“未捕获的类型错误:$(...).autocomplete 不是函数”和 Oracle Apex

[英]"Uncaught TypeError: $(...).autocomplete is not a function" and Oracle Apex

So I am tearing my hair out trying to figure out why this isn't working.所以我正在努力弄清楚为什么这不起作用。 I keep getting an Uncaught TypeError: $(...).autocomplete is not a function error.我不断收到Uncaught TypeError: $(...).autocomplete is not a function错误。 I've searched stack overflow and tried everything I can find but it simply refuses to work.我已经搜索了堆栈溢出并尝试了所有我能找到的东西,但它只是拒绝工作。 I am trying to use this on an Oracle Apex application if that matters.如果这很重要,我正在尝试在 Oracle Apex 应用程序上使用它。

Does anyone have any suggestions as what to do?有没有人有什么建议?

<head>
  <script src="https://code.jquery.com/jquery-3.4.1.js"></script>
  <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
</head>
<body>
    <table id="mytable" class="tg">
        <colgroup>
            <col>
            <col>
            <col>
            <col>
        </colgroup>
        <tr>
            <th class="tg-baqh"></th>
            <th id="A1" class="tg-baqh">Table Name ==></th>
            <th class="columnTypeCss"><div id = "TT00"  contenteditable></div></th>
            </td>
        </tr>
        <tr>
            <th id="A1" class="tg-baqh">Column Name</th>
            <th class="tg-baqh">Column Type</th>
            <th class="tg-baqh">Other Arguments</th>
        </tr>
        <tr>
            <td class="columnNameCss">
                <div  class="ui-widget">
  <input id='AA00'>
</div>
            </td>

            <td  class="columnTypeCss">
                <div class="ui-widget">
  <input id='BB00' >
</div>
            </td> 
            <td class="otherArgumentsCss">
                <div class="ui-widget">
  <input id='CC00' >
</div>
            </td>
        </tr>
    </table>
<div style="text-align: center;">
<button id="myButten2" class="butten" type="button" value="button">Add Column</button>
</div>
    <div><br><br><br><br><br><br><br><br><br><br></div>
</body>
<script>

    function createCell(cell, text) {
        var div = document.createElement('div'), // create DIV element
            txt = document.createTextNode(text); // create text node
        //div.appendChild(txt); // append text node to the DIV
        //div.setAttribute('class', style); // set DIV class attribute
        cell.appendChild(div); // append DIV to the table cell
        cell.innerHTML = "<div contenteditable>" + text + "</div>";
    }


    var addRow = function (event) {
        var table = document.getElementById("mytable");
        var numcols = document.getElementById('mytable').rows[0].cells.length;
        var row = table.insertRow(-1);
        var counter = document.getElementById("mytable").rows.length - 1;
        if(counter<10){
        var padded_counter = '0'+counter}
        else{
        var padded_counter = counter}
        for (i = 0; i < numcols; i++) {
            var cell1 = row.insertCell(-1);
            if (i == 0) {
                cell1.setAttribute('class', 'columnNameCss')
                cell1.setAttribute('id', 'AA'+padded_counter)
                cell1.innerHTML = "<div contenteditable></div>"
            } else if (i == 1) {
                cell1.setAttribute('class', 'columnTypeCss')
                cell1.setAttribute('id', 'BB'+padded_counter)
                cell1.innerHTML = "<div contenteditable></div>";
            } else {
                cell1.setAttribute('class', 'otherArgumentsCss')
                cell1.setAttribute('id', 'CC'+padded_counter)
                cell1.innerHTML = "<div contenteditable></div>"
            }
            //if(i=0){cell1.className = "columnNameCss";}
            //if(i=3){cell1.className="columnNameCss"}
            //else if (i=1){cell1.className="columnTypeCss"}else{
            //    cell1.className="otherArgumentsCss"
            //}
        }

    }
document.getElementById("myButten2").addEventListener("click", addRow, false);
</script>  <script>
  $( function() {
    var availableTags = [
      "ActionScript",
      "AppleScript",
      "Asp",
      "BASIC",
      "C",
      "C++",
      "Clojure",
      "COBOL",
      "ColdFusion",
      "Erlang",
      "Fortran",
      "Groovy",
      "Haskell",
      "Java",
      "JavaScript",
      "Lisp",
      "Perl",
      "PHP",
      "Python",
      "Ruby",
      "Scala",
      "Scheme"
    ];
    $( "#tags" ).autocomplete({
      source: availableTags
    });
  } );
  </script>

It can be related to the different versions of JQuery conflict.它可能与不同版本的 JQuery 冲突有关。 You can try to remove link to the jquery CDN or use apex.jQuery instead of $ .您可以尝试删除指向 jquery CDN 的链接或使用apex.jQuery而不是$

More: https://docs.oracle.com/database/121/HTMDB/app_comp001.htm#HTMDB29028更多: https : //docs.oracle.com/database/121/HTMDB/app_comp001.htm#HTMDB29028

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 未捕获的TypeError:$(…).autocomplete不是函数 - Uncaught TypeError: $(…).autocomplete is not a function jQuery Uncaught TypeError:$(…).autocomplete不是函数 - jQuery Uncaught TypeError: $(…).autocomplete is not a function Uncaught TypeError:未定义不是函数jQuery自动完成 - Uncaught TypeError: undefined is not a function jquery autocomplete jQuery自动完成 - 未捕获TypeError:undefined不是函数 - jQuery autocomplete - Uncaught TypeError: undefined is not a function 未捕获的模态不是函数 - 顶点 - Uncaught Modal is not a function - apex jQuery Autocomplete(1.8.5) - 未捕获的TypeError,属性'source'不是函数 - jQuery Autocomplete (1.8.5) - Uncaught TypeError, property 'source' is not a function 自动完成表单错误:未捕获的TypeError:data.match不是函数 - Autocomplete form error: Uncaught TypeError: data.match is not a function 未捕获(承诺)类型错误:ser[i].data.map 不是顶点 chart.js 中的 function - Uncaught (in promise) TypeError: ser[i].data.map is not a function in apex chart.js 在Oracle APEX中使用自动完成功能将下拉列表添加到文本字段 - Add Dropdown to a Text Field with AutoComplete in Oracle APEX 未捕获的TypeError:函数不是函数 - Uncaught TypeError: Function is not a function
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM