Title: Problem witch load()
Last modified: December 25, 2019

---

# Problem witch load()

 *  Resolved [malepiwo11](https://wordpress.org/support/users/malepiwo11/)
 * (@malepiwo11)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/problem-witch-load/)
 * Hi. I try use jQuery function load() to refresh page with wavesurfer plugin and
   if I call function the I get error :
 * `Uncaught TypeError: Cannot read property 'name' of undefined`
 *     ```
       $j(document).on('ready ajaxComplete wavesurfer', function(event, request, settings) {
       	if (typeof settings !== 'undefined') {
       		if (settings.success.name === 'wavesurfer_wp_ajax') return;
       	} else {
       		WaveSurferInit();
       	}
       });
       ```
   
 * In line:
    `if (settings.success.name === 'wavesurfer_wp_ajax') return;`
 * Using load():
 * `jQuery("#div").load(location.href + " #div");`
 * How i can fix this?
    -  This topic was modified 6 years, 5 months ago by [malepiwo11](https://wordpress.org/support/users/malepiwo11/).
    -  This topic was modified 6 years, 5 months ago by [malepiwo11](https://wordpress.org/support/users/malepiwo11/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [malepiwo11](https://wordpress.org/support/users/malepiwo11/)
 * (@malepiwo11)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/problem-witch-load/#post-12271278)
 * I have in source:
 * `<progress class="wavesurfer-loading" value="0" max="100"></progress>`
 * And player not show
 *  Plugin Author [X-Raym](https://wordpress.org/support/users/x-raym/)
 * (@x-raym)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/problem-witch-load/#post-12271363)
 * I have no idea what you are trying to do and how you are processing but it doesnt
   seems it is an error in my code.
 * I can’t really help with plugin modding,
    but what I can tell you is that you
   have to check how I call jqery function in my javascript. It is not the standard
   way, I use jquery strict.
 * Have fun modding !
 *  Thread Starter [malepiwo11](https://wordpress.org/support/users/malepiwo11/)
 * (@malepiwo11)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/problem-witch-load/#post-12271387)
 * `jQuery("#div").load(location.href + " #div");`
 * This code i use in site, not in plugin code.
 * My problem is that if I have a DIV block on the page with players listed with
   the function foreach () and I try to reload this block with the function load()
   then I get the above error, and instead of players I have a loading bar.
 * Could you help solve this problem?
    -  This reply was modified 6 years, 5 months ago by [malepiwo11](https://wordpress.org/support/users/malepiwo11/).
 *  Plugin Author [X-Raym](https://wordpress.org/support/users/x-raym/)
 * (@x-raym)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/problem-witch-load/#post-12272137)
 * I’m not sure I can help there :S I’m not familiar with this.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Problem witch load()’ is closed to new replies.

 * ![](https://ps.w.org/wavesurfer-wp/assets/icon-128x128.png?rev=1295137)
 * [WaveSurfer-WP](https://wordpress.org/plugins/wavesurfer-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wavesurfer-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wavesurfer-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/wavesurfer-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wavesurfer-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wavesurfer-wp/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [X-Raym](https://wordpress.org/support/users/x-raym/)
 * Last activity: [6 years, 5 months ago](https://wordpress.org/support/topic/problem-witch-load/#post-12272137)
 * Status: resolved