facebook

Alert Mrssage without URL

πŸ’‘
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 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #345816 Reply

    Hi
    Howe do i make this happen in an easy way? Why cant you just remove the Url-adress within your popup alert in Mobione design center?
    Regards

    Alert Message without URL

    From Octavio on the Forum regarding Alert Messages:

    Following are 2 phoneui.js api that can be used in apps and webapps. The app context using the phonegap notification api which does not include the app URL. When used in a webapp the implementation falls back to standard javascript alert() and confirm() dialogs with the app url. In the jsdoc β€˜TC’ refers to Test Center.

    Code:

    /**
    * shows alert and calls fnContinue then. Note: works in different
    * ways in iOS and TC. For TC it returns immediately, while for iOS
    * it returns only when user pressed OK
    *
    * @param message Text message
    * @param fnContinue function that called when user selected button.
    * @param optionalTitle optional, title for dialog
    * @param optionalButtonLabel optional, button label
    */
    phoneui.alert(message, fnContinue, optionalTitle, optionalButtonLabel)

    /**
    * shows confirmation dialog. result comes to fnContinue. Blocks in web app, doesn’t block in
    * phonegap apps
    *
    * @param message Text message
    * @param fnContinue function that called when user selected button. Takes 1-based index of selected button
    * @param optionalTitle optional, title for dialog
    * @param optionalButtonLabel optional, string with comma-separated button labels
    */
    phoneui.confirm(message, fnContinue, optionalTitle, optionalButtonLabel)

    #345893

    Hi Rayan,

    Attached a sample file that contains two buttons that calls a standar alert and the custom alert which doesn’t show the url on title, pushing second button you should get this result:
    See attachment phoneuialert.png

    Attachments:
    You must be logged in to view attached files.
    #345913

    Hi

    I copy the the script to a new button but still the same url adress appers.

    Sorry if I dont understand…

    #345916

    Hi Rayan,

    Could you tell me where you are testing it?

    #345918

    Hi
    I published the app, and there was the url again, perhapes I’m doing it wrong!
    If I understand you correctly I can use the script from one of the attached buttons no?

    Ray

    #345921

    Hi Rayan,

    The problem is that you are testing a web app, note the comment before describing the functions:

    When used in a webapp the implementation falls back to standard javascript alert() and confirm() dialogs with the app url.

    So that you only can use phoneui.alert() in native apps.

    #345922

    Hi
    Thank you for the reply, well than i have to go native then I supose.
    Do you recomend that?

    Regards
    Ray

    #345974

    Hi Rayan,

    The document URL depicted in the native javascript alert() can not be avoided in webapps, only in native apps. If your target deployment is a mobile website then you may consider using a 3rd party dialog instead of any of the javascript notification apis (e.g., alert(), confirm(), prompt() )

    #347410

    MalakSadik
    Participant

    so if i used phoneui.alert the url will not be displayed after building the ios app?

    #347418

    Brandon
    Member

    @angelsprincess1
    Thats correct, it will not work on web apps, but native apps should show a better alert without the URL.

    #347467

    Paul_paul
    Participant

    More to the point how can I remove the “Alert” from the “Alert Message”? I would like it to say something else …. ‘Danger! Danger!’ maybe.

Viewing 11 posts - 1 through 11 (of 11 total)
Reply To: Alert Mrssage without URL

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