onload issue with IE10

Use this board to ask questions or have discussions with other Rich Displays users.
robhathome2
Profound User
Posts: 42
Joined: Mon Jun 27, 2011 9:11 am
First Name: Rob
Last Name: Horton
Company Name: Design Group Plc
Contact:

onload issue with IE10

Post by robhathome2 »

Hi

Has anyone else experienced this?

We have a screen (screen 3 in a sequence) that worked fine in IE9 (and still works in Chrome and FF). In the onload we set some screen objects with various attributes (we fix some of the top ones so they never scroll off the screen, force the subfile/grid to have the exact number of rows as are populated in it and some intelligent cursor positioning/focussing). It worked fab.

My feeling (from my limited knowledge) is that whatever triggers the onload in the browser (be something like document.ready) is occurring too early and that all the objects I'm trying to meddle with are not yet there.

Now for the slightly stranger thing. As long as I do not exit the program completely but come back to screen 2 and go back in to screen 3 it works! But it does consistently fail on the first time.

I can confirm that the onload is being triggered as I put an alert in there (and due to the delay caused by the alert it all worked).

Any thoughts?

Thanks in advance

Rob.
MLC601
Profound User
Posts: 32
Joined: Mon Oct 10, 2011 9:30 am
First Name: Mark
Last Name: Chastant
Company Name: Jano Justice Systems, INC
Phone: 601-927-4428
Contact:

Re: onload issue with IE10

Post by MLC601 »

Rob, we've experienced the same thing. Do you have any external JavaScript specified on the screen with the onload? That seems to be the issue. If you can, place the JS in the ...htdocs/profoundui/userdata/custom/js directory and remove the external JavaScript reference. At least, that's what worked for us.

Mark
robhathome2
Profound User
Posts: 42
Joined: Mon Jun 27, 2011 9:11 am
First Name: Rob
Last Name: Horton
Company Name: Design Group Plc
Contact:

Re: onload issue with IE10

Post by robhathome2 »

Hi Mark

Thanks for the reply and the heads up.

I do indeed have some external javascript - but it wasn't the actual code that was failing. However, I'm guessing that having the external script is causing the issue so I'll try removing it and feedback here. If that change does work then I'm guessing it's something we might want to push back to Profound - even if it is just for their knowledge.

Rob
MLC601
Profound User
Posts: 32
Joined: Mon Oct 10, 2011 9:30 am
First Name: Mark
Last Name: Chastant
Company Name: Jano Justice Systems, INC
Phone: 601-927-4428
Contact:

Re: onload issue with IE10

Post by MLC601 »

The onload event doesn't seem to execute the first time the screen is displayed if there is external javascript. There is an open ticket with Profound on this. I opened it sometime near the end of August.

Mark
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: onload issue with IE10

Post by Scott Klement »

When you place a JavaScript file in /www/your-instance/htdocs/profoundui/userdata/custom (or any subdirectory beneath it) it will automatically be loaded when you begin a PUI session.

When you use the 'External Javascript' property, it is loaded the first time that the screen is displayed.

Javascript files, once loaded, will remain in your browser's memory until you end/start a new PUI session (at which time, it may draw them from the browser cache), or until you use the pui.refresh() API to refresh the loaded files. So they are not re-loaded on every screen display in either case.

The code in Profound UI attempts to run the 'onload' event only after all of the 'external Javascript' files have completed loading. So it is very plausible that it could react differently when the file is already loaded and in cache vs. when it's loaded for the first time.

Loading your file through the userdata/custom directory seems like a great way to work around the problem. Will that work for you, Rob?
robhathome2
Profound User
Posts: 42
Joined: Mon Jun 27, 2011 9:11 am
First Name: Rob
Last Name: Horton
Company Name: Design Group Plc
Contact:

Re: onload issue with IE10

Post by robhathome2 »

Thanks Mark and Scott

I'll be trying to change the placement of my JS in the next hour so will feedback with what happens.

I think my issue seems to be slightly different in that if I put an alert in the onload it does execute. I can't help wondering if the trigger for the onload to execute is triggering too early so that the elements my js attampts to work with are not there. It does work with Chrome. Hence why I can't get away from it potentially being either a direct issue with IE or PUI not now 'conforming' to how IE10 works. I think I have even seen the debugger report (but just the once unfortunately) that it could not find the elements to apply properties too etc.

Regards

Rob.
robhathome2
Profound User
Posts: 42
Joined: Mon Jun 27, 2011 9:11 am
First Name: Rob
Last Name: Horton
Company Name: Design Group Plc
Contact:

Re: onload issue with IE10

Post by robhathome2 »

Results are in:

It didn't fix it. I've got a work around but it is not guaranteed to work (I'm using setTimeout with a 200ms delay to try and give the element time to 'appear').

I'm not sure where I go from here.

Scott - any suggestions?
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: onload issue with IE10

Post by Scott Klement »

Rob, to help you with this, I need to be able to reproduce it. That way, I can debug/troubleshoot and find out where it is going wrong.

Can you tell me how to reproduce this issue? Does it happen every time on every screen when you use the 'onload' in IE10?

Can you press Ctrl-F9 on the screen where the error is occurring? This will download a json.txt file to your PC that contains all the data needed to re-create your screen display. Send it to me (either upload it here, or e-mail to support@profoundlogic.com) and I will try it in my copy of IE10 and see if I can reproduce the problem that way.
User avatar
Alex
Profound Logic Staff Member
Posts: 233
Joined: Fri Jan 04, 2008 12:10 pm
First Name: Alex
Last Name: Roytman
Company Name: Profound Logic Software
Contact:

Re: onload issue with IE10

Post by Alex »

Hi All,

We were able to recreate and fix the problem. The fix will be published in the next update of Profound UI.

Alex
robhathome2
Profound User
Posts: 42
Joined: Mon Jun 27, 2011 9:11 am
First Name: Rob
Last Name: Horton
Company Name: Design Group Plc
Contact:

Re: onload issue with IE10

Post by robhathome2 »

Scott - apologies. I was away getting some pre-winter sun.

Alex - that's great news. IE10 seems to have caused a few issues from what I saw around the web when investigating this, and not just with Profound. Do you have an approximate next release date?

Rob
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests