3

I am part way through developing a mobile web app which contains almost no HTML elements. JSON2HTML is used to create HTML elements.

My problem is that it works ok except for on

  • iPad
  • Android 4.0.3 Native browser.

The problem with these browsers is that the content isn't being rendered.

It works fine on

  • Android 4.0.3 Chrome,
  • Android 4.0.3 Firefox
  • Android 4.0.3 Opera
  • Android 4.0.3 Dolphin
  • Android 4.1.1 Native
  • Android 4.1.1 Other browsers

Just to clarify, this is a mobile web app, not a native mobile app. I am not using any native code, I am using standard web technologies (HTML5, CSS3, jQuery, Javascript, JSON)

2 Answers 2

2

After days of research and testing, I have found the solution.

  1. First I activated the built-in debugger on my Android phone - instructions at http://tinyurl.com/768qltl
  2. The debugger then told me that the error was at line 71 of jquery.json2html.js
  3. I opened jquery.json2html.js
  4. I replaced line 71 with the following code
    else $.fn.append.call($(this),$(dom).children());

This works because the previous line 71 was calling the jquery append.apply function, which only works with specific data type on older browsers.

Sign up to request clarification or add additional context in comments.

Comments

1

Your best bet would be finding a way to remotely debug what's happening in the native browser. There are a couple ways to do this.

  • Install an app like JsHybugger, which acts as a reverse proxy
  • Add some new JavaScript to the source page and use Weinre, JSConsole, or to attach remotely

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.