facebook

custom js issue? CLOSED

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #343543 Reply

    Robert Gardner
    Participant

    I have this code in my custom js.. I need to know if the alerts I’ve placed for debugging purposes should fire. There are 2 functions called one to clear some input fields the other does some specific setup stuff for my app. Both of the functions previously worked. I haven’t changed them. I need to know if I should see these alerts with the device either initializes or resumes (I have the same code inserted where the device resumes..)

    //called when we initialize
    function onDeviceReady() {
    document.addEventListener("resume", onDeviceResume, false);
    alert('Device ready first time about to clear input');
    clearInput();
    alert('OnDevice Ready about to call set rate');
    setrate();
    }
    #343582

    support-michael
    Keymaster

    My first thought is yes the alerts should appear assuming this function is actually called and there are not errors in the code.

    1) How are you testing it, e.g., on a device, in the Mobile Web Simulator, Test Center….?
    If you are testing on a device please provide all the details of that device: model, os version, everything….

    2) What version of mobione are you using?

    3) If you are using mobione 2.5 please specify what version of Cordova API you have specified.

    #343589

    Robert Gardner
    Participant

    Wayne,

    Thank you for your response… I built a test app and found that indeed it should fire the alert. At first I thought it was an issue / idiosyncrasy of the simulator for iOS7 but that wasn’t the case…

    I’m getting up to speed on Javascript and I thought that it was a top down interpretive “language” but that does not appear to be the case… It seems that 1 misplaced or mal-constructed line of code regardless of it’s location in the custom.js seems to invalidate the whole thing… That was my case in this instance… I thought that the code would be executed from the top down and fail on the offending line of code….

    Thanks again for the review and comment…

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: custom js issue? CLOSED

You must be logged in to post in the forum log in