×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Apr 2010
    Location
    Rosario, Argentina
    Posts
    38

    Thumbs down App not working in phone

    My app worked great in the simulator in the cloud and now that is finished I tried it in the device (c3 and x3-02) in both cases most images are not working and many css attributes as simple as background color or background url are not working.
    I have no idea what could cause this, in the initial state of the app one month ago I tested the html (without the dinamic content) and it was working in the device.
    What's concerning is that in the cloud simulator it's working perfect.

    Also the screens are ok when I deploy by url and take the ?type=webapp from the url, but if I add that it's not working.

    Any ideas?

  2. #2
    Super Contributor
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: App not working in phone

    Hi,

    This could be due to quotation marks in generated HTML (just a guess since I haven't seen your code). The simulator is more forgiving in these cases than the device.

    Code:
    document.getElementById("btn").innerHTML = "<div onclick=\'mwl.toggle(\"#tg1\");return false;\'>wrong</div>";
    document.getElementById("btn2").innerHTML = "<div onclick=\"mwl.toggle(\'#tg1\');return false;\">right</div>";
    In those cases where CSS attributes are not working, are the rest of the attributes applied correctly? I.e. if you have set width and bg-color, only bg-color is missing but width works for selected element?

    Br,
    Ilkka

  3. #3
    Registered User
    Join Date
    Apr 2010
    Location
    Rosario, Argentina
    Posts
    38

    Re: App not working in phone

    Hi Ilkka,
    Thanks for your answer. You showed 2 cases, which one should be used? Is it better to mix simple and double quotation marks, or to escape them with \?

    Also screen.width is not working for us, it's always displaying the app in 320x240. This happening on real device, not sure if the screen.width value works on simulator since it's always showing 172px (I don't know why).

    Thanks
    Pam

  4. #4
    Super Contributor
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: App not working in phone

    Hi,

    The one that says "right" is the correct way to do it
    "Wrong" does work on simulator, but not on a actual device.

    In simple cases it is enough to mix single and double quotation marks, but when content gets complicated (like setting params for MWL calls), well have to start escaping those.

    Have you tried window.innerWidth & window.innerHeight? they do work for me on the device.

    Br,
    Ilkka

Similar Threads

  1. [moved] Cannot discover device using s60 phone but working in s40 phone
    By kenichi24 in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2009-09-23, 09:33
  2. Replies: 1
    Last Post: 2009-09-23, 09:29
  3. app working in default gray phone not woking in default colour phone
    By josephcarmel in forum Mobile Java General
    Replies: 5
    Last Post: 2009-03-25, 10:07
  4. U.S phone in India, not working
    By salman4u in forum General Development Questions
    Replies: 2
    Last Post: 2006-12-18, 07:58
  5. code is not working in the phone...
    By hegdeshashi in forum Symbian
    Replies: 1
    Last Post: 2005-11-15, 07:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •