Page 1 of 1

fadeObject()?

PostPosted: Sun Aug 17, 2014 9:20 pm
by PetrH
Hi there,

I'm using the fadeObject function to fade in a group of fields and buttons when the page loads. Throughout 267 of 285 pages this function is working perfectly. But in one section, one of the standard fields, unique to only this section, isn't being faded in. Well, oddly, occasionally it will fade in partially; but only rarely. It is part of the same group that I used on every other page.

I've tried moving it out of the group and it then appears on every page where it should. But that ruins the effect of the page fading in that is working so nicely everywhere else in this book.

I've tried some debugging work and the field's visible property returns true when tested after publishing and the transparent property returns false. I don't know why this is happening... so I'm hoping for some ideas from the forum.

Thanks,
Pete

Re: fadeObject()?

PostPosted: Sun Aug 17, 2014 10:58 pm
by Clifton
Here are some things that may help in troubleshooting this:
  1. Does this happen in all browsers? If yes, then you can rule out a browser anomaly as the problem must lie in the actions on the page. If no, then suspect that the issue is a timing issue. You may need to delay the fade effect until the page has come to an idle state. The PowerPac includes a function called onFirstIdle() which detects when the page has come to an idle state. The developer can make the idle detection even more flexible by setting an additional delay-after-idle time before the function passes on load page actions to either an on trigger or an on user event action.
  2. Does the problem occur if you disable the effect and trigger it manually with a separate button? If yes, then you can pretty for certain suspect the timing issue described above.
  3. Is the problem object a catalog object? If yes, then suspect that there is some reset code that may be executing during the fade operation.
  4. Is the problem object used by any other widget (question object, etc.) on the page? If yes, then suspect the timing issue described in item 1. It may be that the other widget/object is issuing a reset to the problem object BEFORE it has finished it's fade operation.
  5. Can you provide a ink to a page that demonstrates the problem?
  6. Are you using the latest version of the PowerPac? This is always a good idea.
  7. It is important that any objects that are manipulated by PowerPac functions have unique names.
  8. It is also a good idea to check "Enable IE HTML 5 Display" in the PowerPac menu if IE is giving you trouble.
  9. Is the problem consistent—always on the same page—or, does the failure occur on different pages of the book?