NetTalk Central

Author Topic: iPad with iOS5: Number Fields show empty data + "Error in site JavaScript"  (Read 10071 times)

Jeffrey Kuijt

  • Full Member
  • ***
  • Posts: 142
    • View Profile
    • Email
Hi Bruce,

This is a big problem for me and my customers.
We have just upgraded the iPads to the new iOS 5.0 version.
Websites (and also NetTalk apps) are loading much faster in iOS 5.0, so that's very nice.

BUT in iOS 5.0:
Now our NetTalk application shows Number Fields as "empty".
And you see the error "Error in site JavaScript" for a fraction of a second when pressing insert/change on a browse or when returning from the form to the browse.

Please look at:
http://www.adsystemsmedia.nl/Bug-Number-Fields-iOS5.pdf
for a very detailed explanation.

In iOS 4.3.3 none of these problems, but I can't forbid my customers to upgrade to the new iOS 5.0 with lots of new features.

Using the latest NetTalk 5.38 with the latest web folder.

Please help!

Best regards
Jeffrey

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
As a quick fix you may want to change your number fields to strings. I had the same problem with Safari from computers and not iPAD. I only had a couple so I just changed them but their also may be a CSS fix you can apply.

Jeffrey Kuijt

  • Full Member
  • ***
  • Posts: 142
    • View Profile
    • Email
As a quick fix you may want to change your number fields to strings. I had the same problem with Safari from computers and not iPAD. I only had a couple so I just changed them but their also may be a CSS fix you can apply.

Hi Kevin,

Thanks, I know that.
I have a lot of Number Fields so that the NUMERIC keyboard will be shown on the iPad. So that my iPad users can enter numbers very quickly.
But when I change them to String Fields, my iPad users get the ABC keyboard and they won't like that.

Best regards
Jeffrey

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Hi Jeffrey,

I'll update my iPad and see if I can duplicate. I'll keep you posted.

cheers
Bruce

Jeffrey Kuijt

  • Full Member
  • ***
  • Posts: 142
    • View Profile
    • Email
I'll update my iPad and see if I can duplicate. I'll keep you posted.

Thanks a lot Bruce!

I hope you can find a fix for this soon because my customers are on my neck right now.

Best regards
Jeffrey

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
first I have to update the iPad - that's timing out a lot...

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Hi Jeffrey,

Ok, well the iPad is updated.
I'm not seeing the "JavaScript Error" you mentioned, in either popup or page modes. So I guess that might be related to your app somehow. See if you can duplicate that in any of the examples.

On the number front - what picture are you using for the number? I did some experimenting, and the short answer is that if you make a field a "number" then literally no formatting is allowed in some browsers.

Now the experience does change from one browser to the next, but it appears that "no formatting" is allowed in numbers used in a "number" field. The browser may format the number (or may not) - but the "value" of the number is a strict number.decimal with no other formatting (no commas, no spaces etc). If you need formatted numbers then you need to use a String field. (and yes, I understand what that means).

I will add some code to the 5.39 build (out later this week) which enforces the number picture on number fields - in the meantime you can change the picture on fields if you like, it needs to be in the form
@n_x.y
or
@n0x.y
where x and y are the only variables you can change.

if you use 0 instead of _, then the leading zeros are dropped in most browsers anyway.

Whichever one you pick, the number itself may, or may not, be formatted on the browser. For example, on chrome the number displays as
12345.67
with no formatting. On the iPad it displays as
12 345.67 (using an automatic space separator.)

You'd think the space separator is better, but it can be a problem - entering a number like a "year" renders as 2 011 which is a bit uncool.

In short, consider the number field to be "formatted" - or more accurately "formatted by the browser however it pleases".

cheers
Bruce


« Last Edit: October 18, 2011, 10:47:08 PM by Bruce »

Jeffrey Kuijt

  • Full Member
  • ***
  • Posts: 142
    • View Profile
    • Email
I'm not seeing the "JavaScript Error" you mentioned, in either popup or page modes. So I guess that might be related to your app somehow. See if you can duplicate that in any of the examples.

On the number front - what picture are you using for the number? I did some experimenting, and the short answer is that if you make a field a "number" then literally no formatting is allowed in some browsers.

Hi Bruce,

Thanks!!

Please look at:
http://www.adsystemsmedia.nl/Bug-Number-Fields-iOS5.pdf
This document describes exactly your web50.app example in which I mention when the JavaScript error occurs.
It also describes my test with some pictures for the Number Fields.

I will wait for 5.39 so that I can use my Number Fields with the numeric keyboard on the iPads.
Thanks again Bruce!

Best regards
Jeffrey

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
With regard to the error in 5.20 - unfortunately it's not related. That error is there for a reason, to catch errors in the JavaScript (in the web folder) - and in 5.20 it did it's job (and was corrected).

However in that case the error appeared, and remained visible (which is the designed behaviour).

In your case, which I'm struggling to duplicate (I saw it one, but have't managed it again) the error flashes briefly, then disappears. I think it could be caused by triggering a link before the page load completes - leaving the JavaScript on the first page "broken" (but "fixed" when the second page completes).

It is of course harmless and falls into the "if you don't let the page finish loading, you don't see the finished product" category. If this is the problem then there's no real way around it, other than to remove the error completely (which I think is a bad idea.)

I don't think this is related to iOS5 much either - I suspect it has more to do with timing and caching and so on. iOs5 is just starting without a cache.

cheers
Bruce

Jeffrey Kuijt

  • Full Member
  • ***
  • Posts: 142
    • View Profile
    • Email
In your case, which I'm struggling to duplicate (I saw it one, but have't managed it again) the error flashes briefly, then disappears. I think it could be caused by triggering a link before the page load completes - leaving the JavaScript on the first page "broken" (but "fixed" when the second page completes).

I don't think this is related to iOS5 much either - I suspect it has more to do with timing and caching and so on. iOs5 is just starting without a cache.

Hi Bruce,

When I choose Insert or Change (web50 example) then I get the flashing JavaScript error message approx. 9 times out of 10.
This only happens on my iPad with iOS5.
When I take my other iPad with iOS4.3.3 and I connect to the same web50 app, then NO flashing messages.

Best regards
Jeffrey

Devan

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • Email
Re: iPad with iOS5: Number Fields show empty data + "Error in site JavaScript"
« Reply #10 on: October 20, 2011, 04:48:09 PM »
Hi Bruce,

Just chiming in here to say that I am seeing the same error on my web app that I was testing on my iPad last night.  The 'Javascript Error' red bar flickers on very briefly on each page load.

Interestingly, when testing on Chrome and Safari on a PC/Mac, I don't see that message.  Perhaps it happens too quickly in that environment?  I would have thought if it was a Webkit compatibility issue it would happen on the PC webkit based browsers too?!?

Cheers,
Devan

Jeffrey Kuijt

  • Full Member
  • ***
  • Posts: 142
    • View Profile
    • Email
Re: iPad with iOS5: Number Fields show empty data + "Error in site JavaScript"
« Reply #11 on: November 01, 2011, 11:15:50 PM »
Hi Bruce,

Running with 5.39.
I have changed my Number Fields to String Fields and that works ok with pictures under iOS5.
But I still get sometimes the JavaScipt error message, only under iOS5.

Best regards
Jeffrey

AZIS350

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
    • Email
Re: iPad with iOS5: Number Fields show empty data + "Error in site JavaScript"
« Reply #12 on: November 19, 2011, 05:18:10 PM »
I had the same situation on our ipads and our clients when moving up to IOS 5 with the javascript error briefly appearing before certain pages were displayed. In our case, we seem to have resolved that problem by just going into the settings on the iPad and go to Safari, then clear the history and cookies/cache.


Jeffrey Kuijt

  • Full Member
  • ***
  • Posts: 142
    • View Profile
    • Email
Re: iPad with iOS5: Number Fields show empty data + "Error in site JavaScript"
« Reply #13 on: November 20, 2011, 10:52:57 AM »
Hi

I just cleared the history and cookies, but still I sometimes see the javaScript error.
It is not so often, but appears under iOS5.
Never saw it under iOS4.3.

Best regards
Jeffrey

AZIS350

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
    • Email
Re: iPad with iOS5: Number Fields show empty data + "Error in site JavaScript"
« Reply #14 on: November 20, 2011, 01:58:15 PM »
Did you first completely close out of Safari on your iPad by bringing up the list of open apps on the bottom and closing shutting the app down? Then clear the safari settings history and cookies.