question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

js error when use boxRefresh

See original GitHub issue

Issue type:

  • Feature request
  • Bug report
  • Documentation

Environment:

  • AdminLTE Version: 2.4.2
  • Operating System: Windows 10 16299 x64
  • Browser (Version): Chrome 63.0.3239.108

Description:

when i use $.boxRefresh like below

<div class="box box-primary" data-source="/manage?action=request" data-type="horizontalBar">
  <div class="box-header with-border">
    <i class="fa fa-bar-chart"></i>
    <h3 class="box-title">Chart</h3>
    <div class="box-tools pull-right">
      <a class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></a>
      <a class="btn btn-box-tool refresh-btn"><i class="fa fa-refresh"></i></a>
    </div>
  </div>
  <div class="box-body">
    <div class="chart-responsive"><canvas></canvas></div>
  </div>
</div>
<script type="text/javascript">
$(document).ready(function() {
  $('.box[data-source]').boxRefresh({
    loadInContent: false,
    responseType: 'json',
    onLoadDone: function(data) {
      console.log(data);
    }
  })
 })
</script>

i got Uncaught TypeError: b.replace is not a function at Function.ga.matchesSelector (jquery.min.js:2) at Function.r.filter (jquery.min.js:2) at Ka (jquery.min.js:3) at r.fn.init.remove (jquery.min.js:3) at f._removeOverlay (adminlte.min.js:14) at f.<anonymous> (adminlte.min.js:14) at i (jquery.min.js:2) at Object.fireWith [as resolveWith] (jquery.min.js:2) at A (jquery.min.js:4) at XMLHttpRequest.<anonymous> (jquery.min.js:4)

it seems that Overlay is not work

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
camweircommented, Jan 25, 2018

I found the same error. The call to .remove is not correct. I changed the adminlte.js function

f.prototype._removeOverlay = function() { a(this.element).remove(this.$overlay) }

to the following:

f.prototype._removeOverlay = function() { a(this.$overlay).remove() }

0reactions
OldaHorakcommented, Feb 1, 2019

Hi! The request #1981 just pulled, this issue should be closed, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

js error when use boxRefresh · Issue #1767 - GitHub
Issue type: Feature request Bug report Documentation Environment: AdminLTE Version: 2.4.2 Operating System: Windows 10 16299 x64 Browser ...
Read more >
Page refresh in case of javascript errors - Stack Overflow
So I want to implement a simple kind of watch dog. One of my ideas is to use a meta-refresh-tag. The Browser will...
Read more >
JavaScript Box-Refresh.docx - /* BoxRefresh ... - Course Hero
View JavaScript Box-Refresh.docx from BSC. ... {'use strict'var DataKey = 'lte.boxrefresh'var Default = {source: '',params: {},trigger: '.refresh-btn' ...
Read more >
Update a select box only - JavaScript - SitePoint Forums
I have a form to add a buildin to a database, how can I update the select box which allows a building to...
Read more >
Troubleshoot the Splunk Add-on for Box
If you are seeing 403 Forbidden or "permission denied" errors, first verify that you are using a Box account with sufficient permissions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found