0

I am working on one of the project in that project we have used lots of jquery like AutoComplete, blockUI, DatePicker and etc. All working well except IE and FF.

Actually everyone's machine has no problem with these browsers except one system. In that system we are getting an error which says $.blockUI is not a function. We have cleared the cache from that system but still unable to find any route cause for it. If anyone have any idea related this issue than please let me know. I have wasted 2 days in this issue but not able to find cause whether it is system problem or code bug..

powtac
  • 40,542
  • 28
  • 115
  • 170
user968441
  • 1,471
  • 9
  • 22
  • 48
  • In console (F12), can you confirm that the blockUI plugin source code has been loaded? – sdespont Jan 07 '13 at 08:25
  • @sdespont: Ya its being loded. First i have checked it than tried other areas like cleared cached and etc... – user968441 Jan 07 '13 at 08:26
  • What are you meaning by "except one system"? – sdespont Jan 07 '13 at 08:28
  • @sdespont: I mean I can reproduce this issue only in one of the system. No other system has any issue regarding this. – user968441 Jan 07 '13 at 08:30
  • 1
    what about your toolbars in the browers... try disabling that and try – bipen Jan 07 '13 at 08:33
  • It must be some setting, or even malware, on that particular machine. So all you can do is compare settings with another machine, use another browser or reinstall ;-) – Hanno Jan 07 '13 at 08:35
  • Ok, but what is exactly this system? OS, ... – sdespont Jan 07 '13 at 08:35
  • @sdespont: Windows 7 Ultimate and using latest FF and IE 9 version of browsers. – user968441 Jan 07 '13 at 08:38
  • @Hanno: Actually i was thinking that it must be some settings issue but have not tried with re install browser. Let me try that – user968441 Jan 07 '13 at 08:40
  • @Hanno: Reinstalled but still getting same error.. – user968441 Jan 07 '13 at 08:51
  • @user968441, try from different (preferably new) user account on the problematic system - if that does not work then u can rule out user specific browser settings. Disable all browser add-ons and toolbars. Use tool such as fiddler and confirm if correct script resources are getting loaded or not. – VinayC Jan 07 '13 at 08:59
  • Did you find a solution in the end? – Rexxo May 08 '13 at 10:52

1 Answers1

2

Probably the blockUI is not loaded. Try to add a ready() around your code:

$(document).ready(function() {
    // your code
    $.blockUI;
})

Update, other solutions:

  1. Create it with $.fn.blockUI and call it by $(this).blockUI() when using it as jQuery Plugin
  2. Call it as $(element).block(), see docs.
powtac
  • 40,542
  • 28
  • 115
  • 170
  • Sorry but i think if i missed to write ready() around my code than it will not work from other system. – user968441 Jan 07 '13 at 08:41
  • 1
    Adding ready() to be sure on errors is never wrong... Also It could be that the blockUI is dependent on other not yet loaded stuff... – powtac Jan 07 '13 at 08:47
  • @user968441 I don't agree with you. Using ready() permits to ensure that all scripts will be called after the page has been loaded. Depending on the device, system, ... you will not always have the same behavior. – sdespont Jan 07 '13 at 08:50
  • 1
    @sdespont sure, but when there are errors like `$.xyz is not a function` it might be connected to a missing resource. – powtac Jan 07 '13 at 08:54