NetTalk Central

Author Topic: Busy gif not working  (Read 4565 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Busy gif not working
« on: July 22, 2020, 08:08:32 AM »
Hi, I began to use a custom.js to make the busy.gif appear at the position where the user clicks the mouse.
It works ok in a browse proc but when I include this browse proc in a memory form to get it filtered by another  fields and I, by example, accept one drop and the drop refresh the browse the busy.gif does not appears.
The field to filter the browse are in a separate Tab, see pic
This is the js code:
Code: [Select]
jQuery("html").bind("click",function(e){
$("#_busy").css('left',e.pageX+1).css('top',e.pageY+1);
});
Any way of make it work?
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Busy gif not working
« Reply #1 on: July 22, 2020, 10:07:59 PM »
if you remove your custom js, does the gif then work?

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Busy gif not working
« Reply #2 on: July 23, 2020, 04:39:43 AM »
Yes
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Busy gif not working
« Reply #3 on: July 23, 2020, 06:15:43 AM »
then I guess debug your JavaScript to see where it's going wrong?

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Busy gif not working
« Reply #4 on: July 23, 2020, 06:20:10 AM »
I dont know how to do it.
Its a js I found and I like it very much, because the busy.gif appears just in the place the user clicks the mouse, the the user dont have to find it in the screen.
If you look at the js is very simple.
It binds the click to a function that moves the busy gif, it does not make it visible or not.
« Last Edit: July 23, 2020, 06:52:56 AM by michelis »
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Busy gif not working
« Reply #5 on: July 23, 2020, 06:52:40 PM »
my guess is that it is moving the gif off the screen.
Probably because pageX and pageY are not what you expect them to be...

>>  If you look at the js is very simple.

apparently it is too simple, because it does not work in some cases....

>> It binds the click to a function that moves the busy gif, it does not make it visible or not.

It _positions_ the image - meaning that if it positions it where you can't see it then it's not visible.
You might want to debug where pageX,pageY is....

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Busy gif not working
« Reply #6 on: July 25, 2020, 06:14:46 AM »
Ok, found something
It does not has to do with the position, its ok
problem is the drop does not fires a mouse event...
If I select a drop item, the drop refreshes the browse and no busy gif is shown but meanwhile the browse is refreshed you click on any position on the page the gif appears.
Ive change it to use mousedown instead of click and it works ok now:

Code: [Select]
jQuery("html").bind("mousedown",function(e){
$("#_busy").css('left',e.pageX+1).css('top',e.pageY+1);
});
-----------
Regards
Alberto